/* Page stylesheet: Product detail
   Purpose: layout/visual styles specific to produto.php
   Depends on CSS vars defined in page :root (primary/secondary/text/bg)
   Note: keep shared/global rules in /assets/css/main.css */
*{box-sizing:border-box}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f6f8fb 0%, var(--bg) 100%);
    margin:0;
    line-height:1.45;
}
.container {
    max-width:1240px;
    margin:0 auto;
    padding:0 20px;
}
.hero{
    background:linear-gradient(120deg,var(--primary),var(--secondary));
    color:#fff;
    padding:20px 0;
    box-shadow:0 10px 30px rgba(17,24,39,.15);
}
.hero-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}
.brand{display:flex;gap:16px;align-items:center}
.brand-logo{
    height:68px;
    object-fit:contain;
    border-radius:10px;
    background:rgba(255,255,255,0.12);
    padding:6px;
}
.brand-fallback{
    width:68px;
    height:68px;
    border-radius:12px;
    background:rgba(255,255,255,0.12);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
    color:#fff;
}
.store-title{font-size:22px;font-weight:700;color:#fff}
.store-subtitle{font-size:13px;opacity:0.96;margin-top:2px;color:#fff}
.hero-actions{display:flex;gap:10px;align-items:center}
.badge-open{
    background:rgba(255,255,255,0.16);
    padding:10px 14px;
    border-radius:24px;
    font-weight:700;
    display:inline-flex;
    gap:8px;
    align-items:center;
    color:#fff;
    font-size:14px;
}
.page-content{padding:26px 0 20px}
.product-page {
    display:grid;
    grid-template-columns:minmax(0,1fr) 390px;
    gap:26px;
    align-items:start;
    margin-top:10px;
}
.gallery {
    min-width:0;
    display:grid;
    grid-template-columns:120px minmax(0,1fr);
    gap:16px;
    align-items:start;
}
.gallery-main {
    background:#fff;
    border-radius:16px;
    border:1px solid rgba(0,0,0,.06);
    box-shadow:0 12px 34px rgba(15,23,42,.08);
    padding:14px;
}
.gallery-main img {
    width:100%;
    height:min(65vh,560px);
    border-radius:12px;
    background:#fff;
    object-fit:contain;
}
.thumbs {
    width:120px;
    display:flex;
    flex-direction:column;
    gap:10px;
    overflow:auto;
    max-height:580px;
    padding-right:4px;
}
.thumbs img {
    width:100%;
    height:90px;
    object-fit:cover;
    border-radius:10px;
    cursor:pointer;
    border:2px solid transparent;
    transition:all .2s ease;
    background:#fff;
}
.thumbs img:hover{transform:translateY(-2px)}
.thumbs img.active { border-color: var(--primary); box-shadow:0 4px 14px rgba(0,0,0,.1);}
.product-details {
    width:100%;
    background:#fff;
    padding:24px;
    border-radius:16px;
    border:1px solid rgba(0,0,0,.06);
    box-shadow:0 12px 34px rgba(15,23,42,.08);
    position:sticky;
    top:20px;
}
.product-title { font-size:30px; line-height:1.2; font-weight:700; color:var(--secondary); margin-bottom:8px; }
.product-price { font-size:34px; font-weight:800; color:var(--primary); margin-bottom:14px; }
.product-desc{color:#616d7b; margin-bottom:18px; font-size:16px}
.add-to-cart {
    width:100%;
    min-height:54px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:14px 18px;
    background:linear-gradient(90deg,var(--primary),var(--secondary));
    color:white;
    border-radius:12px;
    border:none;
    cursor:pointer;
    font-weight:800;
    font-size:16px;
    box-shadow:0 12px 26px rgba(34,104,156,.2);
    transition:transform .15s ease;
}
.add-to-cart:hover{transform:translateY(-2px)}
.is-disabled{opacity:.6;cursor:not-allowed;box-shadow:none;}
.store-closed{color:#c0392b; margin-top:10px; font-size:14px}
.breadcrumbs{
    font-size:14px;
    margin-bottom:16px;
    color:#667085;
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}
.breadcrumbs a{
    color:var(--secondary);
    text-decoration:none;
    font-weight:600;
}
.notfound{
    text-align:center;
    padding:90px 20px;
    background:#fff;
    border-radius:16px;
    border:1px solid rgba(0,0,0,.05);
    box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.btn-back{
    display:inline-block;
    margin-top:14px;
    padding:12px 16px;
    background:var(--primary);
    color:white;
    text-decoration:none;
    border-radius:10px;
    font-weight:700;
}
.modal { display:none; position:fixed; inset:0; background:rgba(2,6,23,0.56); z-index:2000; align-items:center; justify-content:center; padding:20px; }
.modal.show { display:flex; }
.modal-content { background:#fff; border-radius:14px; width:100%; max-width:580px; box-shadow:0 20px 54px rgba(0,0,0,0.3); overflow:hidden; }
.modal-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; background:var(--primary); color:#fff; }
.modal-title{font-weight:800;}
.modal-subtitle{font-size:12px;opacity:0.95;}
.btn-secondary { background: var(--secondary); color:#fff; border:none; padding:10px 14px; border-radius:10px; cursor:pointer; font-weight:700; }
.btn-compact { padding:12px 16px; border-radius:10px; border:none; cursor:pointer; color:#fff; background: var(--primary); font-weight:800; }
.modal-body{padding:18px}
.modal-help{font-size:14px; color:#475467; margin-bottom:12px}
.modal-list{display:flex; flex-direction:column; gap:9px;}
.modal-error{display:none; margin-top:10px; color:#b02a37; font-size:13px;}
.modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:16px;}
.extra-option{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    border:1px solid #e7edf3;
    border-radius:10px;
    padding:10px 12px;
    background:#fbfcfe;
}
.extra-option-main{display:flex;align-items:center;gap:10px}
.extra-price{font-weight:700}
footer{
    background: var(--secondary);
    color: white;
    padding: 28px 0;
    margin-top: 20px;
}
.footer-inner{text-align:center}
.footer-logo{
    height:50px;
    object-fit:contain;
    display:block;
    margin:0 auto 10px;
}
.footer-copy{margin-top:10px}
@media (max-width: 1100px) {
    .product-page{grid-template-columns:1fr 340px}
    .product-title{font-size:26px}
    .product-price{font-size:30px}
}
@media (max-width: 900px) {
    .hero-inner{flex-direction:column;align-items:flex-start}
    .page-content{padding:18px 0}
    .product-page { grid-template-columns:1fr; }
    .gallery{grid-template-columns:1fr}
    .thumbs {
        flex-direction:row;
        width:100%;
        overflow-x:auto;
        max-height:none;
        order:2;
    }
    .thumbs img { height:74px; width:92px; flex:0 0 auto; }
    .product-details { width:100%; position:static; }
    .gallery-main img{height:min(52vh,420px)}
}
@media (max-width: 640px){
    .container{padding:0 14px}
    .brand-logo,.brand-fallback{width:58px;height:58px}
    .store-title{font-size:18px}
    .store-subtitle{font-size:12px}
    .product-title{font-size:22px}
    .product-price{font-size:28px}
    .product-details{padding:18px}
    .gallery-main{padding:10px}
    .add-to-cart{min-height:50px}
}

@media (prefers-reduced-motion: reduce){
    *, *::before, *::after{
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
