/* =========================
   Shop Page
========================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root{
    --primary:#0879c9;
    --primary-dark:#04548f;
    --primary-light:#e9f7ff;
    --dark:#062b44;
    --text:#29465a;
    --muted:#78909f;
    --bg:#f7fbfe;
    --white:#ffffff;
    --border:#e2edf3;
    --shadow:0 20px 60px rgba(7,70,110,.10);
    --radius:24px;

    --accent:#f5ad28;
    --accent-dark:#a86b06;
    --accent-light:#fff4e0;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Vazirmatn',sans-serif;
    background:var(--bg);
    color:var(--text);
    line-height:1.9;
}

body,
button,
input,
textarea,
select{
    font-family:'Vazirmatn',sans-serif;
}

a{
    text-decoration:none;
    color:inherit;
}

button{
    border:none;
    cursor:pointer;
}

img{
    max-width:100%;
    display:block;
}

.container{
    width:min(1180px,92%);
    margin:auto;
}


/* ================= TOPBAR ================= */

.topbar{
    background:#05253b;
    color:#d9f3ff;
    font-size:12px;
}

.topbar-inner{
    min-height:38px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}


/* ================= HEADER ================= */

.header{
    position:sticky;
    top:0;
    z-index:1000;
    background:rgba(255,255,255,.94);
    backdrop-filter:blur(18px);
    border-bottom:1px solid var(--border);
}

.navbar{
    position:relative;
    height:82px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
}

.logo{
    display:flex;
    align-items:center;
    gap:12px;
    flex-shrink:0;
}

.logo-icon{
    /* width:50px;
    height:50px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#0879c9,#15b8f3);
    color:white;
    border-radius:15px;
    font-size:22px;
    box-shadow:0 10px 25px rgba(8,121,201,.22); */
       /* position: relative;
    top: 1px; 
    z-index: 10;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: contain;
    background: white;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.15); */
     width:83px;
    height:83px;
    display:grid;
    place-items:center;
    background:rgba(255, 253, 253, 0.747);
    color:white;
    border-radius:15px;
    font-size:10px;
}

/* .owl-icon{
    width:64%;
    height:64%;
    display:block;
} */

.logo strong{
    display:block;
    font-size:21px;
    color:var(--dark);
    line-height:1.2;
}

.logo small{
    display:block;
    font-size:10px;
    color:var(--muted);
}

.nav-menu{
    display:flex;
    align-items:center;
    gap:25px;
}

.nav-menu a{
    position:relative;
    color:#506b7b;
    font-size:14px;
    font-weight:600;
    transition:.25s;
}

.nav-menu a:hover,
.nav-menu a.active{
    color:var(--primary);
}

.nav-menu a.active:after{
    content:'';
    position:absolute;
    height:3px;
    width:22px;
    border-radius:20px;
    bottom:-28px;
    right:50%;
    transform:translateX(50%);
    background:var(--primary);
}

.nav-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

.cart-button{
    width:45px;
    height:45px;
    display:grid;
    place-items:center;
    border-radius:14px;
    color:var(--primary);
    background:var(--primary-light);
    position:relative;
}

.cart-count{
    position:absolute;
    top:-5px;
    left:-5px;
    width:20px;
    height:20px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#ff5c73;
    color:#fff;
    font-size:10px;
}

.mobile-menu{
    display:none;
    width:45px;
    height:45px;
    background:var(--primary-light);
    color:var(--primary);
    border-radius:14px;
}

@media(max-width:900px){

    .nav-menu{
        position:absolute;
        top:calc(100% + 1px);
        right:0;
        left:0;
        flex-direction:column;
        align-items:flex-start;
        gap:6px;
        background:#fff;
        padding:18px 25px;
        border-bottom:1px solid var(--border);
        box-shadow:0 20px 30px rgba(7,70,110,.10);
        display:none;
    }

    .nav-menu.open{
        display:flex;
    }

    .nav-menu a{
        width:100%;
        padding:10px 0;
    }

    .nav-menu a.active:after{
        display:none;
    }

    .mobile-menu{
        display:grid;
        place-items:center;
    }
}


/* ================= BUTTON ================= */

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:12px 22px;
    border-radius:14px;
    font-size:13px;
    font-weight:800;
    transition:.3s;
}

.btn:hover{
    transform:translateY(-3px);
}

.btn-primary{
    color:white;
    background:linear-gradient(135deg,#0879c9,#12a8e9);
    box-shadow:0 12px 28px rgba(8,121,201,.22);
}

.btn-white{
    color:var(--primary);
    background:white;
}

.btn-outline{
    border:1px solid #cce8f6;
    color:var(--primary);
    background:#fff;
}

.btn-outline-white{
    border:1px solid rgba(255,255,255,.6);
    color:#fff;
}

.btn-large{
    padding:15px 26px;
}


.shop-page{
    direction:rtl;
    padding:50px 30px;
    background:var(--bg);
}


/* عنوان */

.shop-page h1{

    text-align:center;
    color:var(--dark);
    font-size:36px;
    margin-bottom:40px;

}



/* چیدمان فروشگاه */

.shop-wrapper{

    display:flex;
    gap:30px;
    max-width:1300px;
    margin:auto;
    align-items:flex-start;

}



/* =========================
   Categories
========================= */


.shop-category{

    width:250px;
    background:var(--white);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:25px;
    box-shadow:var(--shadow);

}



.shop-category h3{

    color:var(--dark);
    font-size:16px;
    font-weight:700;
    margin-bottom:20px;

}



.shop-category button{

    width:100%;
    padding:12px;
    margin-bottom:10px;

    border:none;
    border-radius:12px;

    background:var(--primary-light);
    color:var(--primary-dark);

    font-family:inherit;
    font-size:15px;

    cursor:pointer;
    transition:.3s;

}



.shop-category button:hover{

    background:var(--primary);
    color:white;

}

.shop-category button.active{

    background:var(--primary);
    color:white;

}

.sub-category{
    margin-top:15px;
    padding-top:18px;
    border-top:1px dashed var(--border);
}

.sub-category h4{
    font-size:12px;
    color:var(--muted);
    margin-bottom:12px;
    font-weight:700;
}

.sub-category button{
    width:100%;
    padding:9px 12px;
    margin-bottom:8px;
    border:none;
    border-radius:10px;
    background:#f3f8fb;
    color:var(--text);
    font-family:inherit;
    font-size:13px;
    cursor:pointer;
    transition:.3s;
    text-align:right;
}

.sub-category button:hover{
    background:var(--primary-light);
    color:var(--primary-dark);
}

.sub-category button.active{
    background:var(--primary);
    color:#fff;
}




/* =========================
   Products
========================= */


.products{

    flex:1;

    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;

}


.products-wrapper{
    flex:1;
}

.shop-search{
    display:flex;
    align-items:center;
    gap:10px;
    background:var(--white);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:14px 20px;
    box-shadow:var(--shadow);
    margin-bottom:25px;
}

.shop-search i{
    color:var(--muted);
    font-size:14px;
}

.shop-search input{
    flex:1;
    border:none;
    outline:none;
    background:none;
    font-family:inherit;
    font-size:14px;
    color:var(--text);
}

.shop-search input::placeholder{
    color:var(--muted);
}

.shop-search button{
    background:none;
    color:var(--muted);
    font-size:14px;
    cursor:pointer;
    padding:4px;
}

.shop-search button:hover{
    color:#ff5c73;
}

.search-result-info{
    grid-column:1 / -1;
    font-size:13px;
    color:var(--muted);
    margin-bottom:5px;
}




.product{

    background:var(--white);

    border:1px solid var(--border);

    border-radius:var(--radius);

    padding:20px;

    box-shadow:var(--shadow);

    text-align:center;

    transition:.3s;

    display:flex;
    flex-direction:column;
    height:100%;

}

.product h3{
    flex:0 0 auto;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.product > p,
.product > a.price-from,
.product p.price-pending,
.product p.out-of-stock{
    flex:0 0 auto;
}

.product > button,
.product > a.btn-select-size{
    margin-top:auto;
}



.product:hover{

    transform:translateY(-5px);

}

.no-products{

    grid-column:1 / -1;
    text-align:center;
    padding:60px 20px;
    color:var(--muted);
    font-size:16px;
    background:var(--white);
    border:1px dashed var(--border);
    border-radius:var(--radius);

}



.product img{

    width:100%;
    height:220px;

    object-fit:contain;
    background:#fff;

    border-radius:18px;

}



.product h3{

    color:var(--dark);
    font-size:15px;
    font-weight:700;
    line-height:1.6;
    margin:15px 0;

}



.product p{

    color:var(--primary-dark);
    font-size:15px;
    font-weight:700;

}

.product p.price-pending{
    color:#c8324a;
    font-size:13px;
    font-weight:700;
    background:#fff0f2;
    display:inline-block;
    padding:4px 12px;
    border-radius:20px;
}

.product p.out-of-stock{
    color:#6b7785;
    font-size:13px;
    font-weight:700;
    background:#eef1f4;
    display:inline-block;
    padding:4px 12px;
    border-radius:20px;
}




.product button{

    width:100%;

    background:var(--primary);

    color:white;

    border:none;

    padding:13px;

    border-radius:12px;

    font-family:inherit;

    cursor:pointer;

    transition:.3s;

}



.product button:hover{

    background:var(--primary-dark);

}


.floating-cart{
position:fixed;
left:25px;
bottom:25px;
width:65px;
height:65px;
border-radius:50%;
background:#0879c9;
color:#fff;
display:flex;
justify-content:center;
align-items:center;
font-size:24px;
cursor:pointer;
box-shadow:0 15px 35px rgba(0,0,0,.2);
z-index:999;
}

.floating-cart span{
position:absolute;
top:-6px;
right:-5px;
width:24px;
height:24px;
border-radius:50%;
background:#ff4d6d;
display:flex;
align-items:center;
justify-content:center;
font-size:12px;
font-weight:bold;
}

.cart-overlay{
position:fixed;
inset:0;
background:rgba(0,0,0,.4);
opacity:0;
visibility:hidden;
transition:.35s;
z-index:998;
}

.cart-panel{
position:fixed;
bottom:-100%;
left:0;
right:0;
height:70vh;
background:#fff;
border-radius:30px 30px 0 0;
box-shadow:0 -10px 40px rgba(0,0,0,.2);
transition:.45s;
display:flex;
flex-direction:column;
z-index:999;
}

.cart-panel.active{
bottom:0;
}

.cart-overlay.active{
opacity:1;
visibility:visible;
}

.cart-header{
display:flex;
justify-content:space-between;
align-items:center;
padding:20px;
border-bottom:1px solid #eee;
}

.cart-header h3{
font-size:22px;
}

.cart-header button{
background:none;
font-size:24px;
cursor:pointer;
}

.cart-items{
flex:1;
overflow:auto;
padding:20px;
}

.cart-item{
display:flex;
align-items:center;
gap:15px;
padding:15px;
margin-bottom:15px;
border:1px solid #eee;
border-radius:15px;
}

.cart-item img{
width:80px;
height:80px;
object-fit:cover;
border-radius:12px;
}

.cart-info{
flex:1;
}

.remove-item{
background:none;
color:#ff5c73;
font-size:16px;
align-self:flex-start;
cursor:pointer;
padding:4px;
}

.remove-item:hover{
color:#c8324a;
}

.cart-footer{
padding:20px;
border-top:1px solid #eee;
}

.total{
display:flex;
justify-content:space-between;
font-size:20px;
font-weight:bold;
margin-bottom:15px;
}

.checkout{
width:100%;
padding:15px;
border:none;
border-radius:15px;
background:#0879c9;
color:#fff;
font-size:17px;
cursor:pointer;
transition:.3s;
}

.checkout:hover{
background:#04548f;
}

.empty{
text-align:center;
margin-top:100px;
color:#777;
}

/* =========================
   Cart
   بدون fixed
========================= */


.cart-box{

    margin:40px auto 20px;

    width:max-content;

    background:var(--primary);

    color:white;

    padding:15px 30px;

    border-radius:var(--radius);

    font-size:18px;

}


.qty-box{
display:flex;
align-items:center;
gap:12px;
margin-top:10px;
}

.qty-box button{
width:34px;
height:34px;
border:none;
border-radius:10px;
background:#0879c9;
color:white;
font-size:18px;
cursor:pointer;
transition:.3s;
}

.qty-box button:hover{
background:#04548f;
}

.qty-box span{
min-width:25px;
text-align:center;
font-size:18px;
font-weight:bold;
}
/* =========================
   Mobile
========================= */


@media(max-width:1000px){


.shop-wrapper{

    flex-direction:column;

}


.shop-category{

    width:100%;

}


.products{

    grid-template-columns:repeat(2,1fr);

}


}



@media(max-width:600px){


.shop-page{

    padding:30px 15px;

}


.products{

    grid-template-columns:1fr;

}


.shop-page h1{

    font-size:28px;

}


}
.footer{
    background:#041e31;
    color:#b8d0dd;
    padding-top:65px;
}

.footer-grid{
    display:grid;
    grid-template-columns:1.5fr 1fr 1fr 1fr;
    gap:50px;
}

.footer-logo strong{
    color:#fff;
}

.footer-logo small{
    color:#9cb7c5;
}

.footer-about p{
    max-width:350px;
    font-size:12px;
    margin:18px 0;
}

.socials{
    display:flex;
    gap:8px;
}

.socials a{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:11px;
    background:#0a3048;
    color:#8ddcff;
}

.footer h4{
    color:#fff;
    margin-bottom:15px;
}

.footer-links{
    display:grid;
    gap:8px;
}

.footer-links a{
    color:#9db7c5;
    font-size:12px;
    transition:.2s;
}

.footer-links a:hover{
    color:#fff;
}

.footer-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-top:1px solid rgba(255,255,255,.08);
    margin-top:45px;
    padding:20px 0;
    font-size:10px;
}

.heart-icon{
    margin-right:4px;
    color:var(--accent);
}


/* ================= TOAST ================= */

.toast{
    position:fixed;
    right:25px;
    bottom:25px;
    z-index:9999;
    padding:14px 20px;
    background:#052d48;
    color:#fff;
    border-radius:14px;
    box-shadow:0 15px 45px rgba(0,0,0,.2);
    transform:translateY(120px);
    opacity:0;
    transition:.3s;
    font-size:12px;
}

.toast.show{
    transform:translateY(0);
    opacity:1;
}

/* =========================================================
   PRODUCT DETAIL PAGE
========================================================= */

.pd-breadcrumb{
    direction:rtl;
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    color:var(--muted);
    padding:25px 30px 0;
    max-width:1300px;
    margin:auto;
}

.pd-breadcrumb a{
    color:var(--muted);
}

.pd-breadcrumb a:hover{
    color:var(--primary);
}

.pd-layout{
    direction:rtl;
    display:grid;
    grid-template-columns:1fr 1fr 320px;
    gap:30px;
    max-width:1300px;
    margin:20px auto 60px;
    padding:0 30px;
    align-items:start;
}

.pd-image-box{
    position:relative;
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:20px;
}

.pd-image-box img{
    width:100%;
    height:360px;
    object-fit:contain;
    background:#fff;
    border-radius:18px;
}

.pd-info{
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:30px;
}

.pd-category-tag{
    display:inline-block;
    padding:5px 14px;
    border-radius:20px;
    background:var(--primary-light);
    color:var(--primary-dark);
    font-size:11px;
    font-weight:700;
    margin-bottom:14px;
}

.pd-info h1{
    color:var(--dark);
    font-size:22px;
    line-height:1.8;
    margin-bottom:16px;
}

.pd-price{
    font-size:26px;
    font-weight:800;
    color:var(--primary-dark);
    margin-bottom:20px;
}

.pd-price.price-pending{
    font-size:14px;
    color:#c8324a;
    background:#fff0f2;
    display:inline-block;
    padding:6px 14px;
    border-radius:20px;
}

.pd-price.out-of-stock{
    font-size:14px;
    color:#6b7785;
    background:#eef1f4;
    display:inline-block;
    padding:6px 14px;
    border-radius:20px;
}

.pd-variant-btn.out-of-stock{
    opacity:.55;
    text-decoration:line-through;
}

.pd-variant-btn.out-of-stock small{
    display:block;
    font-size:9px;
    font-weight:600;
    text-decoration:none;
}

.pd-description{
    color:var(--text);
    font-size:14px;
    line-height:2;
    margin-bottom:25px;
    padding-bottom:25px;
    border-bottom:1px solid var(--border);
}

.pd-qty-row{
    display:flex;
    align-items:center;
    gap:15px;
    margin-bottom:20px;
}

.pd-qty-row .qty-box{
    margin-top:0;
}

#pdAddBtn{
    width:100%;
    background:var(--primary);
    color:#fff;
    border:none;
    padding:15px;
    border-radius:14px;
    font-family:inherit;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
    transition:.3s;
}

#pdAddBtn:hover{
    background:var(--primary-dark);
}

#pdAddBtn:disabled{
    background:#ccc;
    cursor:not-allowed;
}

.pd-sidebar{
    display:grid;
    gap:20px;
}

.pd-sidebar .sidebar-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    padding:22px;
    box-shadow:var(--shadow);
}

.pd-sidebar .sidebar-card h4{
    color:var(--dark);
    margin-bottom:16px;
    font-size:14px;
}

.related-post{
    display:flex;
    gap:12px;
    align-items:center;
    padding:11px 0;
    border-bottom:1px solid var(--border);
}

.related-post:last-child{
    border-bottom:none;
    padding-bottom:0;
}

.related-post:first-child{
    padding-top:0;
}

.related-post img{
    width:56px;
    height:56px;
    object-fit:cover;
    border-radius:10px;
    flex-shrink:0;
}

.related-post strong{
    display:block;
    font-size:12px;
    color:var(--dark);
    line-height:1.7;
    font-weight:700;
}

#productNotFound{
    display:none;
    max-width:600px;
    margin:60px auto;
    text-align:center;
    padding:60px 30px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
}

#productNotFound.show{
    display:block;
}

#productNotFound i{
    font-size:40px;
    color:var(--muted);
    margin-bottom:15px;
}

@media(max-width:1000px){

    .pd-layout{
        grid-template-columns:1fr;
    }

}

@media(max-width:600px){

    .pd-layout,
    .pd-breadcrumb{
        padding-left:15px;
        padding-right:15px;
    }

    .pd-image-box img{
        height:260px;
    }

}

/* =========================================================
   PRODUCT DETAIL — IMAGE GALLERY (thumbnails)
========================================================= */

.pd-thumbnails{
    display:none;
    gap:10px;
    margin-top:14px;
    flex-wrap:wrap;
}

.pd-thumbnail{
    width:64px;
    height:64px;
    padding:0;
    border-radius:12px;
    overflow:hidden;
    border:2px solid var(--border);
    background:none;
    cursor:pointer;
    transition:.25s;
    flex-shrink:0;
}

.pd-thumbnail img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.pd-thumbnail:hover{
    border-color:var(--primary-light);
}

.pd-thumbnail.active{
    border-color:var(--primary);
}


/* =========================================================
   PRODUCT DETAIL — VARIANTS (بسته‌بندی/سایز)
========================================================= */

.pd-variants{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:18px;
}

.pd-variant-btn{
    padding:10px 18px;
    border-radius:12px;
    border:1.5px solid var(--border);
    background:#fff;
    color:var(--text);
    font-family:inherit;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    transition:.25s;
}

.pd-variant-btn:hover{
    border-color:var(--primary);
    color:var(--primary);
}

.pd-variant-btn.active{
    background:var(--primary);
    border-color:var(--primary);
    color:#fff;
}


/* =========================================================
   SHOP GRID — انتخاب بسته‌بندی (لینک به صفحه جزئیات)
========================================================= */

.product .btn-select-size{
    display:block;
    width:100%;
    text-align:center;
    background:var(--primary);
    color:#fff;
    border:none;
    padding:13px;
    border-radius:12px;
    font-family:inherit;
    font-size:14px;
    cursor:pointer;
    transition:.3s;
}

.product .btn-select-size:hover{
    background:var(--primary-dark);
}

.price-from{
    color:var(--muted) !important;
    font-size:13px !important;
    font-weight:600 !important;
}

.price-from strong{
    color:var(--primary-dark);
    font-size:18px;
    font-weight:bold;
}


/* =========================================================
   PRODUCT DETAIL — NAVIGATION ARROWS + ZOOM (magnifier)
========================================================= */

.pd-image-zoom-wrap{
    position:relative;
    overflow:hidden;
    border-radius:18px;
    cursor:zoom-in;
}

.pd-image-zoom-wrap img{
    transition:opacity .15s;
}

.pd-image-zoom-wrap.zoomed img{
    opacity:0;
}

.pd-image-zoom-wrap.zoomed{
    background-repeat:no-repeat;
    background-size:200%;
}

.pd-image-nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:40px;
    height:40px;
    border-radius:50%;
    background:rgba(255,255,255,.92);
    color:var(--primary-dark);
    box-shadow:0 6px 18px rgba(7,70,110,.18);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    cursor:pointer;
    transition:.25s;
    z-index:5;
}

.pd-image-nav:hover{
    background:var(--primary);
    color:#fff;
}

.pd-image-prev{
    right:32px;
}

.pd-image-next{
    left:32px;
}

.pd-image-nav.hidden{
    display:none;
}

@media(max-width:600px){

    .pd-image-nav{
        width:34px;
        height:34px;
        font-size:12px;
    }

    .pd-image-prev{
        right:26px;
    }

    .pd-image-next{
        left:26px;
    }

}
/* نمایش صحیح خط جدید (\n) در توضیحات محصول */
#pdDescription{
    white-space: pre-line;
}