:root {
  --bs-primary: #c0392b;
  --bs-danger: #c0392b;
  --bs-primary-rgb: 192, 57, 43;
  --bs-danger-rgb: 192, 57, 43;
}

.btn-primary, .btn-danger {
  background-color: #c0392b;
  border-color: #c0392b;
}
.btn-primary:hover, .btn-danger:hover {
  background-color: #a93226;
  border-color: #a93226;
}
.btn-outline-danger {
  color: #c0392b;
  border-color: #c0392b;
}
.btn-outline-danger:hover {
  background-color: #c0392b;
  border-color: #c0392b;
}

a { color: #c0392b; }
.list-group-item.active { background-color: #6c757d; border-color: #6c757d; }

/* Hero */
.hero{position:relative;height:80vh;display:flex;align-items:center;justify-content:center;text-align:center;color:#fff;overflow:hidden}
.hero-slides{position:relative;width:100%;height:100%}
.hero-slide{position:absolute;inset:0;opacity:0;transition:opacity 1s ease-in-out;pointer-events:none;display:flex;align-items:center;justify-content:center;text-align:center}
.hero-slide.active{opacity:1;pointer-events:auto}
.hero-bg{position:absolute;inset:-4rem 0;background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.6)),url(/static/images/hero.jpg) center/cover no-repeat}
.hero-bg[style*="background-image"]{background-size:cover;background-position:center}
.hero-content{position:relative;z-index:1;max-width:700px;padding:0 1rem}
.hero h1{font-size:3rem;margin-bottom:1rem}
.hero p{font-size:1.25rem;margin-bottom:2rem}
.hero-buttons{display:flex;gap:1rem;justify-content:center}

/* Trust bar */
.trust-bar{background:#f8f9fa;padding:1rem 0;border-bottom:1px solid #e5e5e5}
.trust-inner{display:flex;justify-content:center;gap:2rem;flex-wrap:wrap}
.trust-item{display:flex;align-items:center;gap:.5rem;font-size:.9rem;color:#555}
.trust-icon{color:#27ae60;font-weight:700}

/* Cards */
.card{border:1px solid #e5e5e5;overflow:hidden;transition:transform .2s,box-shadow .2s}
.card:hover{transform:translateY(-4px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.card img{height:200px;width:100%;object-fit:cover}

/* Product card */
.product-card{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:1rem;text-align:center}
.product-card img{height:200px;width:100%;object-fit:cover;border-radius:4px;margin-bottom:1rem}
.bestsellers .product-card img{height:300px}
.product-card h3{font-size:1.1rem;margin-bottom:.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-card .price{color:#c0392b;font-size:1.25rem;font-weight:700;margin-bottom:1rem}

/* Timeline */
.timeline{display:flex;justify-content:center;gap:1.5rem;flex-wrap:nowrap;margin:2rem 0}
.timeline-item{display:flex;flex-direction:column;align-items:center;gap:.25rem;width:200px;text-align:center}
.timeline-item .year{font-size:1.5rem;font-weight:800;color:#c0392b}

/* Review */
.review-card{background:#f8f9fa;padding:1.5rem;border-radius:8px}
.review-card p{font-style:italic;margin-bottom:1rem}
.reviewer{color:#777;font-size:.9rem}

/* Product page */
.product-gallery img{width:100%;border-radius:8px}
.product-info h1{font-size:2rem;margin-bottom:.5rem}
.product-info .sku{color:#777;margin-bottom:1rem}
.product-info .price{font-size:2rem;color:#c0392b;font-weight:700;margin-bottom:1.5rem}
.product-desc-html p{margin-bottom:1rem}
.checklist{list-style:none;margin:1rem 0;padding:0}
.checklist li{padding:.4rem 0;padding-left:1.5rem;position:relative}
.checklist li::before{content:"✓";position:absolute;left:0;color:#27ae60;font-weight:700}
.specs-table{width:100%;border-collapse:collapse;margin:1rem 0}
.specs-table td{padding:.75rem;border-bottom:1px solid #e5e5e5}
.specs-table td:first-child{font-weight:600;width:40%}
details{margin:1rem 0;border:1px solid #e5e5e5;border-radius:4px;padding:1rem}
summary{font-weight:600;cursor:pointer}

/* Article card */
.article-card{padding:1.5rem;border:1px solid #e5e5e5;border-radius:8px}
.article-card h2{font-size:1.5rem;text-align:left;margin-bottom:.5rem}
.article-card .meta{color:#777;font-size:.9rem;margin-bottom:.5rem}
.post-body p{margin-bottom:1rem}
.post-body ul{margin:1rem 0 1rem 1.5rem}

/* Article nav grid (home) */
.article-nav-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}
.article-nav-card{position:relative;border-radius:8px;overflow:hidden;display:block;color:#fff;text-decoration:none;aspect-ratio:4/3}
.article-nav-image{position:absolute;inset:0}
.article-nav-image img{width:100%;height:100%;object-fit:cover}
.article-nav-info{position:absolute;bottom:0;left:0;right:0;padding:1.5rem;background:linear-gradient(transparent,rgba(0,0,0,.7));z-index:1}
.article-nav-info h3{font-size:1.1rem;margin-bottom:.25rem}
.article-nav-date{font-size:.85rem;opacity:.8}
.article-nav-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);opacity:0;transition:opacity .3s;z-index:2}
.article-nav-card:hover .article-nav-overlay{opacity:1}

/* Toast */
.toast{position:fixed;top:1.5rem;right:1.5rem;z-index:200;max-width:360px;padding:1rem 1.25rem;border-radius:8px;background:#fff;border:1px solid #e5e5e5;box-shadow:0 8px 24px rgba(0,0,0,.12);display:flex;align-items:flex-start;gap:.75rem;animation:toastIn .4s ease}
.toast.success{border-left:4px solid #27ae60}
.toast.error{border-left:4px solid #c0392b}
.toast-icon{font-size:1.25rem;line-height:1}
.toast.success .toast-icon{color:#27ae60}
.toast.error .toast-icon{color:#c0392b}
.toast-body{flex:1;font-size:.95rem;line-height:1.5}
.toast-close{background:none;border:none;font-size:1.25rem;color:#999;cursor:pointer;line-height:1;padding:0}
.toast-close:hover{color:#333}
.toast.hiding{animation:toastOut .3s ease forwards}
@keyframes toastIn{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}
@keyframes toastOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}

/* Chat Widget */
.chat-widget{position:fixed;bottom:1.5rem;right:1.5rem;z-index:150;font-family:inherit}
.chat-toggle{width:56px;height:56px;border-radius:50%;background:#c0392b;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.2);transition:transform .2s}
.chat-toggle:hover{transform:scale(1.05)}
.chat-toggle-badge{position:absolute;top:-2px;right:-2px;width:18px;height:18px;background:#27ae60;color:#fff;font-size:.7rem;border-radius:50%;display:flex;align-items:center;justify-content:center}
.chat-window{position:absolute;bottom:70px;right:0;width:340px;height:460px;background:#fff;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.18);display:flex;flex-direction:column;overflow:hidden;border:1px solid #e5e5e5}
.chat-window-header{padding:.75rem 1rem;background:#c0392b;color:#fff;display:flex;justify-content:space-between;align-items:center;font-weight:600}
.chat-window-header button{background:none;border:none;color:#fff;font-size:1.25rem;cursor:pointer}
.chat-window-body{flex:1;display:flex;flex-direction:column;padding:1rem;overflow:hidden}
#chatMessagesStep{flex:1;min-height:0;width:100%;flex-direction:column}
.chat-message-list{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem;margin-bottom:.75rem;width:100%}
.chat-bubble{max-width:85%;min-width:60px;padding:.6rem .9rem;border-radius:14px;font-size:.9rem;line-height:1.4;word-break:break-word}
.chat-bubble-visitor{align-self:flex-end;background:#c0392b;color:#fff;border-bottom-right-radius:4px}
.chat-bubble-admin{align-self:flex-start;background:#f1f3f5;color:#1a1a1a;border-bottom-left-radius:4px}
.chat-bubble-time{font-size:.7rem;opacity:.7;margin-top:.25rem}
.chat-window-input{display:flex;gap:.4rem;align-items:center}
.chat-window-input input{flex:1 1 auto;min-width:0;padding:.5rem .7rem;border:1px solid #ddd;border-radius:20px;font-size:.9rem}
.chat-window-input button{flex:0 0 auto;padding:.5rem 1rem;border-radius:20px;font-size:.85rem;white-space:nowrap}
.chat-window .btn-primary{background-color:#c0392b;border-color:#c0392b;color:#fff}
.chat-window .btn-primary:hover{background-color:#a93226;border-color:#a93226;color:#fff}

/* Responsive */
@media(max-width:768px){
  .hero h1{font-size:2rem}
  .article-nav-grid{grid-template-columns:1fr}
  .timeline{flex-wrap:wrap;gap:1rem}
  .timeline-item{width:160px}
}
