* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background: #101010;
    color: #f2f2f2;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

.container {
    width: 90%;
    max-width: 1180px;
    margin: auto;
}


/* ================= HEADER ================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(16, 16, 16, 0.92);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #2b2b2b;
}

.nav {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    font-weight: 400;
}

.menu {
    display: flex;
    gap: 22px;
    font-size: 14px;
    color: #bdbdbd;
}

.menu a {
    transition: 0.3s;
}

.menu a:hover {
    color: #ffffff;
}
.account-menu { position: relative; }
.account-menu-toggle { list-style: none; cursor: pointer; }
.account-menu-toggle::-webkit-details-marker { display: none; }
.account-menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-menu-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 120;
    display: grid;
    gap: 4px;
    min-width: 175px;
    padding: 10px;
    border: 1px solid #363636;
    border-radius: 12px;
    background: #181818;
    box-shadow: 0 14px 32px rgba(0,0,0,.35);
}
.account-menu-panel a, .account-menu-panel .account-greeting,
.account-menu-panel .logout-form button { padding: 9px 10px; color: #ddd; font: inherit; font-size: 13px; text-align: right; }
.account-menu-panel a:hover { color: #d8c2a5; background: #222; border-radius: 7px; }
.account-menu-panel .account-greeting { color: #d8c2a5; }
.account-menu-panel .logout-form { margin: 0; }
.account-menu-panel .logout-form button { width: 100%; border: 0; background: transparent; cursor: pointer; }
.account-menu-panel .logout-form button:hover { color: #fff; }
.header-icons {
    display: flex;
    gap: 10px;
}

.icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #333333;
    background: #181818;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d8c2a5;
    transition: all 0.3s ease;
}

.icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon:hover {
    background: #d8c2a5;
    color: #111111;
    border-color: #d8c2a5;
    transform: translateY(-2px);
}
.cart-icon { position: relative; }
.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    min-width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #101010;
    border-radius: 50%;
    background: #d8c2a5;
    color: #111;
    font-size: 10px;
    line-height: 1;
}
.cart-count-inline {
    position: static;
    margin-right: 5px;
    border: 0;
}


/* ================= HERO ================= */

.hero {
    padding: 45px 0;
}

.hero-content {
    min-height: 570px;
    border-radius: 30px;
    overflow: hidden;
    background: #171717;
    color: white;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-text {
    width: 55%;
    padding: 70px;
    position: relative;
    z-index: 2;
}

.small-title {
    color: #a8a8a8;
    font-size: 12px;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 65px;
    line-height: 1.25;
    margin: 20px 0;
    letter-spacing: -3px;
}

.hero h1 span {
    color: #d8c2a5;
}

.hero p {
    color: #c7c7c7;
    max-width: 470px;
    line-height: 2;
    font-size: 14px;
}

.hero-buttons {
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 13px 25px;
    border-radius: 30px;
    font-size: 13px;
    transition: 0.3s;
}

.btn-dark {
    background: #1b1b1b;
    color: #111;
}

.btn-dark:hover {
    transform: translateY(-3px);
}

.btn-light {
    color: white;
    border: 1px solid #555555;
    margin-right: 8px;
}

.btn-light:hover {
    background: #1b1b1b;
    color: black;
}


/* Hero image */

.hero-image {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48%;
    height: 100%;
}

.model-box {
    width: 390px;
    height: 560px;
    position: absolute;
    left: 60px;
    bottom: -80px;
    border-radius: 200px 200px 0 0;
    background:
        linear-gradient(
            145deg,
            #b7aa9b,
            #4a443e
        );
    transform: rotate(8deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-text {
    font-size: 45px;
    font-weight: 800;
    color: rgba(255,255,255,.45);
    transform: rotate(-8deg);
}

.model-text span {
    font-size: 18px;
    letter-spacing: 8px;
}


/* ================= SECTION ================= */

section {
    scroll-margin-top: 100px;
}

.section-title {
    margin-bottom: 25px;
}

.section-title span {
    color: #aaa;
    font-size: 11px;
    letter-spacing: 2px;
}

.section-title h2 {
    font-size: 28px;
    margin-top: 5px;
}


/* ================= CATEGORIES ================= */

.categories {
    padding: 45px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.category {
    height: 230px;
    border-radius: 22px;
    padding: 25px;
    color: white;
    display: flex;
    align-items: end;
    position: relative;
    overflow: hidden;
    transition: .3s;
}

.category:hover {
    transform: translateY(-6px);
}

.category::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    left: -70px;
    top: -80px;
    background: rgba(255,255,255,.08);
}

.category div {
    position: relative;
    z-index: 2;
}

.category span {
    font-size: 11px;
    color: #ccc;
}

.category h3 {
    font-size: 25px;
    margin-top: 5px;
}

.category p {
    font-size: 11px;
    color: #ccc;
    margin-top: 4px;
}

.category-one {
    background: linear-gradient(135deg, #262626, #777);
}

.category-two {
    background: linear-gradient(135deg, #51483e, #9a8c7b);
}

.category-three {
    background: linear-gradient(135deg, #404040, #9a9a9a);
}/* ================= PRODUCTS ================= */

.products {
    padding: 50px 0;
}

.products-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.view-all {
    font-size: 12px;
    color: #b0b0b0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.product-card {
    background: #1b1b1b;
    border: 1px solid #2d2d2d;
    border-radius: 18px;
    overflow: hidden;
    transition: .3s;
}

.product-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 35px rgba(0,0,0,.35);
}

.product-image {
    height: 290px;
    position: relative;
}

.product-1 {
    background: linear-gradient(145deg, #303030, #111111);
}

.product-2 {
    background: linear-gradient(145deg, #454545, #1d1d1d);
}

.product-3 {
    background: linear-gradient(145deg, #3d3d3d, #171717);
}

.product-4 {
    background: linear-gradient(145deg, #4b4239, #1a1816);
}

.badge {
    position: absolute;
    top: 13px;
    right: 13px;
    background: #252525;
    color: white;
    border: 1px solid #3b3b3b;
    border-radius: 20px;
    padding: 6px 10px;
    font-size: 9px;
}

.discount {
    background: #8f3030;
    border-color: #a54444;
}

.heart {
    position: absolute;
    left: 13px;
    top: 13px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #242424;
    color: #f2f2f2;
    border: 1px solid #3b3b3b;
    font-size: 17px;
}

.heart:hover {
    background: #d8c2a5;
    color: #111;
}
.favorite-toggle-form { position: absolute; left: 13px; top: 13px; z-index: 2; }
.favorite-toggle-form .heart { position: static; display: grid; place-items: center; padding: 0; text-decoration: none; }
.favorite-toggle-form .heart.is-favorite { color: #ff8f9b; border-color: #773b43; background: #321d20; }
.favorites-link-text { font-size: 11px; margin-right: 5px; }
.favorites-page { min-height: 72vh; padding: 55px 0 85px; }
.favorites-page .section-title h1 { margin-top: 8px; font-size: 32px; }
.favorites-grid { margin-top: 25px; }
.favorites-product-image { display: block; height: 290px; overflow: hidden; background: #242424; }
.favorites-product-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.favorites-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.favorites-actions strong { font-size: 13px; }
.favorite-remove { padding: 8px 10px; border: 1px solid #653434; border-radius: 8px; background: transparent; color: #ffc5c5; font: inherit; font-size: 11px; }
.favorite-remove:hover { background: #351c1c; }

.product-info {
    padding: 16px;
}

.product-category {
    color: #aaa;
    font-size: 10px;
}
.stock-status {
    display: block;
    margin-top: -8px;
    color: #9bc7a2;
    font-size: 10px;
}
.stock-status.out-of-stock {
    color: #e69b9b;
}

.product-info h3 {
    color: #f1f1f1;
    font-size: 14px;
    margin: 7px 0 16px;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-bottom strong {
    color: #f3f3f3;
    font-size: 12px;
}

.add-cart {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #171717;
    color: white;
    font-size: 20px;
}

.add-cart:hover {
    background: #d8c2a5;
    color: #111;
}


/* ================= OFFER ================= */

.offer {
    min-height: 300px;
    margin-top: 50px;
    border-radius: 25px;
    background: #171717;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 65px rgba(0,0,0,.3);
}

.offer-content {
    padding: 50px;
    position: relative;
    z-index: 2;
}

.offer-content span {
    color: #aaa;
    font-size: 10px;
    letter-spacing: 2px;
}

.offer h2 {
    font-size: 34px;
    line-height: 1.5;
    margin: 10px 0;
}

.offer p {
    color: #aaa;
    font-size: 12px;
}

.offer-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 23px;
    background: #f1eee9;
    color: #111;
    border-radius: 30px;
    font-size: 12px;
}

.offer-button:hover {
    background: #d8c2a5;
}

.offer-shape {
    position: absolute;
    left: 70px;
    top: -130px;
    width: 350px;
    height: 450px;
    border-radius: 50%;
    background: linear-gradient(145deg, #8d8378, #302d29);
    opacity: .5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    font-weight: 800;
    color: rgba(255,255,255,.2);
}/* ================= FOOTER ================= */

footer {
    margin-top: 70px;
    background: #171717;
    color: white;
    padding: 55px 0 25px;
    border-top: 1px solid #292929;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand p {
    max-width: 300px;
    color: #999;
    font-size: 12px;
    line-height: 2;
    margin-top: 15px;
}

.footer-column h3 {
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-column a {
    display: block;
    color: #999;
    font-size: 11px;
    margin-bottom: 10px;
}

.footer-column a:hover {
    color: #d8c2a5;
}

.copyright {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    color: #777;
    font-size: 10px;
}


/* ================= MOBILE ================= */

@media (max-width: 900px) {

    .menu {
        display: none;
    }

    .hero-text {
        width: 100%;
        padding: 45px;
    }

    .hero-image {
        opacity: .45;
        width: 100%;
    }

    .hero h1 {
        font-size: 50px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* ================= MOBILE SMALL ================= */

@media (max-width: 600px) {

    .container {
        width: 92%;
    }

    .nav {
        height: 68px;
    }

    .logo {
        font-size: 21px;
    }


    .hero {
        padding-top: 20px;
    }

    .hero-content {
        min-height: 530px;
        border-radius: 22px;
    }

    .hero-text {
        padding: 30px;
    }

    .hero h1 {
        font-size: 40px;
        letter-spacing: -2px;
    }

    .hero p {
        font-size: 12px;
        color: #c2c2c2;
    }

    .model-box {
        width: 300px;
        height: 470px;
        left: -30px;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-image {
        height: 210px;
    }

    .product-info {
        padding: 11px;
    }

    .product-info h3 {
        font-size: 12px;
    }

    .product-bottom strong {
        font-size: 10px;
        color: #c2c2c2;
    }

    .offer-content {
        padding: 30px;
    }

    .offer h2 {
        font-size: 27px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
}


/* ================= SEARCH BOX ================= */

.search-box {
    width: 250px;
    height: 43px;

    display: flex;
    align-items: center;

    background: #1b1b1b;

    border: 1px solid #363636;

    border-radius: 25px;

    padding: 0 15px;

    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.search-box input {
    width: 100%;
    height: 100%;

    border: none;
    outline: none;

    background: transparent;

    font-family: "Vazirmatn", sans-serif;

    font-size: 12px;

    color: #f2f2f2;

    direction: rtl;
}
.search-box input::placeholder {
    color: #8f8f8f;
}

.search-box:focus-within {
    border-color: #8b7962;
    box-shadow: 0 0 0 3px rgba(216,194,165,.08);
}

/* آیکون جستجو */

.search-icon {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #d8c2a5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 10px;
}

.search-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-icon:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

/* ================= SEARCH MOBILE ================= */

@media (max-width: 600px) {
    .search-box {
        width: 150px;
        height: 39px;
        background: #181818;
    }

    .search-box input {
        font-size: 10px;
    }
}


/* ================= DARK LUXURY FINAL ================= */

body {
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(216,194,165,.045),
            transparent 28%
        ),
        #101010;
}

.header {
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
}

.logo {
    color: #f5f5f5;
}

.logo span {
    color: #d8c2a5;
}

.menu a:hover {
    color: #d8c2a5;
}

.icon:hover {
    background: #d8c2a5;
    color: #111;
    border-color: #d8c2a5;
}

.hero-content {
    box-shadow: 0 25px 70px rgba(0,0,0,.28);
}

.hero h1 span {
    color: #d8c2a5;
}

.btn-dark {
    background: #f1eee9;
    color: #111;
}

.btn-dark:hover {
    background: #d8c2a5;
}

.btn-light:hover {
    background: #d8c2a5;
    border-color: #d8c2a5;
}

.section-title h2,
.product-info h3 {
    color: #f1f1f1;
}

.view-all:hover {
    color: #d8c2a5;
}

.category,
.product-card,
.offer {
    box-shadow: 0 18px 50px rgba(0,0,0,.16);
}

.product-card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
    border-color: #3a3a3a;
}

.product-bottom strong {
    color: #f3f3f3;
}

.add-cart:hover {
    background: #d8c2a5;
    color: #111;
}

.badge {
    background: #252525;
    border: 1px solid #3b3b3b;
}

.discount {
    background: #8f3030;
    border-color: #a54444;
}

.heart {
    background: #242424;
    color: #f2f2f2;
    border: 1px solid #3b3b3b;
}

.heart:hover {
    background: #d8c2a5;
    color: #111;
}

.offer {
    box-shadow: 0 25px 65px rgba(0,0,0,.3);
}

.offer-button {
    background: #f1eee9;
}

.offer-button:hover {
    background: #d8c2a5;
}

.search-box {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.search-box:focus-within {
    border-color: #8b7962;
    box-shadow: 0 0 0 3px rgba(216,194,165,.08);
}

.search-box button:hover {
    background: #d8c2a5;
    color: #111;
}

footer {
    border-top: 1px solid #292929;
}

.footer-column a:hover {
    color: #d8c2a5;
}

@media (max-width: 600px) {

    .search-box {
        background: #181818;
    }

    .hero p,
    .product-category,
    .product-bottom strong {
        color: #c2c2c2;
    }
}
.product-info h3 a:hover { color: #d8c2a5; }
.product-review-link {
    display: inline-block;
    margin: 0 0 12px;
    color: #d8c2a5;
    font-size: 11px;
}
.product-review-link:hover { text-decoration: underline; }
.product-view-count { display: block; margin-top: 5px; color: #aaa; font-size: 12px; }
.product-description {
    margin: 8px 0 10px;
    color: #aaa;
    font-size: 12px;
    line-height: 1.8;
}
.product-detail-description {
    margin: 16px 0;
    color: #ccc;
    line-height: 2;
    white-space: normal;
}
.checkout-form { margin: 18px 0 10px; }
.checkout-form .btn { width: 100%; }
.orders-link { display: block; margin: 10px 0 16px; color: #d8c2a5; font-size: 12px; text-align: center; }
.orders-link:hover { text-decoration: underline; }
.payment-result-page, .orders-page { min-height: 72vh; padding: 55px 0 85px; }
.payment-result {
    max-width: 650px;
    margin: 25px auto;
    padding: 34px;
    border: 1px solid #303030;
    border-radius: 20px;
    background: #171717;
    text-align: center;
}
.payment-result h1 { margin: 10px 0 18px; font-size: 28px; }
.payment-result p { margin: 12px 0; color: #ccc; line-height: 1.9; }
.payment-result.success { border-color: #36513c; }
.payment-result.review { border-color: #695831; }
.payment-result .btn { display: inline-block; margin: 18px 5px 0; }
.orders-page .section-title h1 { margin-top: 8px; font-size: 32px; }
.orders-list { display: grid; gap: 16px; margin-top: 25px; }
.order-card {
    padding: 22px;
    border: 1px solid #303030;
    border-radius: 16px;
    background: #171717;
    color: #bbb;
}
.order-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.order-heading h2 { color: #f1f1f1; font-size: 18px; }
.order-status { padding: 5px 10px; border-radius: 20px; background: #29241e; color: #d8c2a5; font-size: 11px; }
.order-status.status-paid { background: #18301e; color: #bce5c4; }
.order-status.status-cancelled, .order-status.status-expired { background: #351c1c; color: #ffc5c5; }
.order-card ul { margin: 14px 22px 14px 0; line-height: 2; }
.order-card > strong { display: block; margin-top: 12px; color: #eee; }
.order-card p { margin-top: 9px; font-size: 12px; }

/* Home product carousel and all products page */
.product-carousel {
    margin-top: 28px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 14px;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-color: #665947 #202020;
    scrollbar-width: thin;
}
.product-carousel:focus-visible { outline: 2px solid #8b7962; outline-offset: 4px; }
.product-carousel .product-grid {
    display: flex;
    width: max-content;
    min-width: 100%;
    grid-template-columns: none;
    gap: 18px;
}
.product-carousel .product-card {
    flex: 0 0 clamp(245px, 27vw, 285px);
    scroll-snap-align: start;
}
.all-products-page { min-height: 72vh; padding: 55px 0 85px; }
.all-products-page .section-title h1 { margin-top: 8px; font-size: 32px; }
.products-total { align-self: end; color: #aaa; font-size: 13px; }
.products-filter {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto minmax(150px, .7fr) auto;
    align-items: center;
    gap: 10px;
    margin: 25px 0;
    padding: 16px;
    border: 1px solid #2d2d2d;
    border-radius: 14px;
    background: #171717;
}
.products-filter label { color: #ccc; font-size: 12px; }
.products-filter input, .products-filter select {
    min-width: 0;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #363636;
    border-radius: 9px;
    background: #101010;
    color: #f2f2f2;
    font: inherit;
}
.products-filter button { min-height: 42px; padding-inline: 16px; }
.all-products-grid { row-gap: 22px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 35px; }
.pagination-link, .pagination-current {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border: 1px solid #383838;
    border-radius: 9px;
    color: #ddd;
    font-size: 12px;
}
.pagination-link:hover, .pagination-current { border-color: #8b7962; background: #29241e; color: #e8d7bf; }
@media (max-width: 700px) {
    .product-carousel .product-card { flex-basis: min(78vw, 300px); }
    .products-filter { grid-template-columns: 1fr; }
    .products-total { align-self: auto; }
}

/* Contact page */
.contact-page {
    min-height: 70vh;
    padding: 70px 0 90px;
}
.contact-page .section-title h1 {
    font-size: 36px;
    margin-top: 8px;
}
.contact-intro, .contact-details p {
    color: #aaa;
    line-height: 2;
}
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 28px;
    margin-top: 30px;
}
.contact-details, .contact-form {
    padding: 30px;
    border: 1px solid #2d2d2d;
    border-radius: 20px;
    background: #171717;
}
.contact-details h2 {
    font-size: 22px;
    margin-bottom: 12px;
}
.contact-details .btn { margin-top: 22px; }
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contact-form label {
    margin-top: 8px;
    color: #ddd;
    font-size: 13px;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #363636;
    border-radius: 10px;
    background: #101010;
    color: #f2f2f2;
    font: inherit;
    direction: rtl;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus {
    outline: 2px solid #8b7962;
    border-color: #8b7962;
}
.contact-form button { align-self: flex-start; margin-top: 12px; }
.form-message {
    padding: 12px 14px;
    border-radius: 10px;
    line-height: 1.8;
}
.form-message.success { color: #bce5c4; background: #18301e; }
.form-message.error { color: #ffc5c5; background: #351c1c; }
@media (max-width: 700px) {
    .contact-layout { grid-template-columns: 1fr; }
    .contact-page { padding: 45px 0 60px; }
    .contact-details, .contact-form { padding: 22px; }
}

/* Product category page */
.category-page {
    min-height: 70vh;
    padding: 55px 0 85px;
}
.category-page .section-title h1 {
    font-size: 32px;
    margin-top: 8px;
}
.category-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    color: #aaa;
    font-size: 12px;
}
.category-breadcrumb a:hover { color: #d8c2a5; }
.category-breadcrumb strong { color: #f2f2f2; font-weight: 500; }
.category-empty {
    margin: 25px 0;
    padding: 24px;
    border: 1px solid #2d2d2d;
    border-radius: 16px;
    background: #171717;
    color: #bbb;
}
.category-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 35px;
}
.category-switcher .btn-dark { background: #d8c2a5; }
.category-hero {
    min-height: 220px;
    position: relative;
    display: flex;
    align-items: end;
    overflow: hidden;
    margin: 20px 0 32px;
    padding: 30px;
    border: 1px solid #303030;
    border-radius: 22px;
    background: linear-gradient(135deg, #272727, #51483e);
}
.category-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .42;
}
.category-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.06));
}
.category-hero > div { position: relative; z-index: 1; }
.category-hero span { color: #d8c2a5; font-size: 11px; letter-spacing: 2px; }
.category-hero h1 { margin: 7px 0; font-size: 32px; }
.category-hero p { color: #ddd; font-size: 13px; }

.account-greeting {
    color: #d8c2a5;
    white-space: nowrap;
    font-size: 13px;
}
.logout-form { display: inline-flex; }
.logout-form button {
    padding: 6px 10px;
    border: 1px solid #494136;
    border-radius: 18px;
    background: transparent;
    color: #ddd;
    font: inherit;
    font-size: 12px;
}
.logout-form button:hover { color: #111; background: #d8c2a5; }
.auth-notice {
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid #36513c;
    border-radius: 10px;
    background: #18301e;
    color: #bce5c4;
}

/* Admin product management */
.admin-page {
    min-height: 75vh;
    padding: 55px 0 85px;
}
.admin-page .section-title h1 {
    font-size: 32px;
    margin-top: 8px;
}
.admin-panel, .admin-denied {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid #2d2d2d;
    border-radius: 20px;
    background: #171717;
}
.admin-panel h2, .admin-denied h1 {
    margin-bottom: 18px;
    font-size: 21px;
}
.admin-product-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
}
.admin-product-form label {
    align-self: end;
    color: #ddd;
    font-size: 13px;
}
.admin-product-form input, .admin-product-form select, .admin-product-form textarea {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid #363636;
    border-radius: 10px;
    background: #101010;
    color: #f2f2f2;
    font: inherit;
    direction: rtl;
}
.admin-product-form textarea { min-height: 120px; resize: vertical; grid-column: 1 / -1; }
.admin-product-form input:focus, .admin-product-form select:focus, .admin-product-form textarea:focus {
    outline: 2px solid #8b7962;
    border-color: #8b7962;
}
.admin-product-form button { align-self: end; justify-self: start; }
.admin-category-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-bottom: 28px;
}
.admin-category-form label { align-self: end; color: #ddd; font-size: 13px; }
.admin-category-form input {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid #363636;
    border-radius: 10px;
    background: #101010;
    color: #f2f2f2;
    font: inherit;
    direction: rtl;
}
.admin-category-form input:focus { outline: 2px solid #8b7962; border-color: #8b7962; }
.admin-category-form button { align-self: end; justify-self: start; }
.admin-category-image { width: 58px; height: 48px; border-radius: 7px; object-fit: cover; }
.category-admin-table th, .category-admin-table td { vertical-align: middle; }
.admin-delete:disabled { cursor: not-allowed; opacity: .4; }
.admin-feedback { margin-top: 18px; }
.pending-review-list { display: grid; gap: 14px; }
.pending-review-card, .review-card, .review-form-panel {
    padding: 20px;
    border: 1px solid #303030;
    border-radius: 14px;
    background: #141414;
}
.review-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    color: #f2f2f2;
}
.review-stars { color: #d8c2a5; letter-spacing: 2px; }
.pending-review-product, .pending-review-body { margin: 12px 0; color: #ccc; line-height: 1.9; }
.pending-review-product a { color: #d8c2a5; }
.pending-review-card time, .review-card time { color: #888; font-size: 11px; }
.review-moderation-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.review-moderation-actions form { display: inline-flex; }
.review-approve {
    padding: 8px 12px;
    border: 1px solid #45664b;
    border-radius: 8px;
    background: #18301e;
    color: #bce5c4;
    font: inherit;
    font-size: 12px;
}
.admin-count {
    display: inline-flex;
    min-width: 28px;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 20px;
    background: #29241e;
    color: #d8c2a5;
    font-size: 12px;
}
.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 13px;
}
.admin-table th, .admin-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #303030;
}
.admin-table th { color: #d8c2a5; font-weight: 600; }
.admin-table td { color: #ddd; }
.admin-actions {
    white-space: nowrap;
}
.admin-actions form { display: inline-flex; margin-right: 8px; }
.admin-edit, .admin-delete {
    padding: 6px 10px;
    border: 1px solid #494136;
    border-radius: 8px;
    background: transparent;
    color: #d8c2a5;
    font: inherit;
    font-size: 12px;
}
.admin-delete { color: #ffc5c5; border-color: #653434; }
.admin-edit:hover { background: #29241e; }
.admin-delete:hover { background: #351c1c; }
.admin-cancel { align-self: center; color: #aaa; font-size: 13px; }
.admin-denied p { color: #aaa; margin-bottom: 18px; }
.admin-order-status-form { display: flex; align-items: center; gap: 8px; min-width: 225px; }
.admin-order-status-form select { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #363636; border-radius: 10px; background: #101010; color: #f2f2f2; font: inherit; direction: rtl; }
.admin-order-status-form select:focus { outline: 2px solid #8b7962; border-color: #8b7962; }
.admin-order-status-form button { flex: 0 0 auto; cursor: pointer; }
.admin-table td ul { margin: 0; padding-right: 18px; }
.admin-table td small { color: #999; }

/* Shopping cart */
.cart-page {
    min-height: 72vh;
    padding: 55px 0 85px;
}
.cart-page .section-title h1 {
    font-size: 32px;
    margin-top: 8px;
}
.cart-page .section-title h1 small {
    color: #999;
    font-size: 14px;
    font-weight: 400;
}
.cart-empty {
    margin-top: 24px;
    padding: 35px;
    border: 1px solid #2d2d2d;
    border-radius: 18px;
    background: #171717;
    color: #bbb;
}
.cart-empty .btn { margin-top: 18px; }
.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}
.cart-items { display: grid; gap: 14px; }
.cart-item {
    display: grid;
    grid-template-columns: 90px minmax(130px, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #2d2d2d;
    border-radius: 16px;
    background: #171717;
}
.cart-item-image {
    width: 90px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    background: #242424;
}
.cart-item-info h2 {
    margin: 5px 0 9px;
    color: #f2f2f2;
    font-size: 15px;
}
.cart-item-info strong { font-size: 12px; }
.cart-quantity-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.cart-quantity-form label { color: #aaa; font-size: 11px; }
.cart-quantity-form input {
    width: 58px;
    padding: 7px;
    border: 1px solid #363636;
    border-radius: 8px;
    background: #101010;
    color: #f2f2f2;
    font: inherit;
}
.cart-update, .cart-remove {
    padding: 7px 9px;
    border: 1px solid #494136;
    border-radius: 8px;
    background: transparent;
    color: #d8c2a5;
    font: inherit;
    font-size: 11px;
}
.cart-remove { border-color: #653434; color: #ffc5c5; }
.cart-summary {
    padding: 22px;
    border: 1px solid #2d2d2d;
    border-radius: 16px;
    background: #171717;
}
.cart-summary h2 { margin-bottom: 20px; font-size: 18px; }
.cart-summary p {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 13px 0;
    color: #aaa;
    font-size: 13px;
}
.cart-summary p strong { color: #eee; }
.cart-summary .cart-total {
    padding-top: 14px;
    border-top: 1px solid #333;
    color: #eee;
}
.cart-summary .btn { display: block; margin-top: 20px; text-align: center; }
.product-detail-page {
    min-height: 75vh;
    padding: 45px 0 85px;
}
.product-detail-card {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) 1.1fr;
    gap: 32px;
    align-items: center;
    padding: 25px;
    border: 1px solid #2d2d2d;
    border-radius: 22px;
    background: #171717;
}
.product-detail-image {
    width: 100%;
    min-height: 350px;
    max-height: 520px;
    border-radius: 16px;
    object-fit: cover;
    background: #292929;
}
.product-detail-info h1 { margin: 10px 0 14px; font-size: 30px; }
.product-rating { margin: 12px 0; color: #d8c2a5; font-size: 13px; }
.product-rating a { margin-right: 8px; color: #aaa; }
.product-detail-price { display: block; margin: 20px 0; font-size: 18px; }
.product-detail-info form { margin-top: 20px; }
.reviews-section { padding-top: 55px; }
.reviews-section .section-title h2 { margin-top: 5px; }
.review-list { display: grid; gap: 12px; margin-bottom: 24px; }
.review-card p { margin: 12px 0; color: #ddd; line-height: 2; }
.review-form-panel { margin-top: 25px; }
.review-form-panel h3 { margin-bottom: 16px; font-size: 18px; }
.review-form { display: grid; gap: 10px; max-width: 650px; }
.review-form label { margin-top: 6px; color: #ddd; font-size: 13px; }
.review-form select, .review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #363636;
    border-radius: 10px;
    background: #101010;
    color: #f2f2f2;
    font: inherit;
}
.review-form textarea { resize: vertical; }
.review-form button { justify-self: start; margin-top: 8px; }
@media (max-width: 850px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { order: -1; }
}
@media (max-width: 600px) {
    .cart-item { grid-template-columns: 70px minmax(0, 1fr); align-items: start; }
    .cart-item-image { width: 70px; height: 80px; }
    .cart-quantity-form, .cart-remove-form { grid-column: 2; }
}
@media (max-width: 700px) {
    .product-detail-card { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
    .product-detail-image { min-height: 260px; max-height: 360px; }
    .product-detail-info h1 { font-size: 24px; }
}
@media (max-width: 650px) {
    .admin-product-form, .admin-category-form { grid-template-columns: 1fr; }
    .admin-panel, .admin-denied { padding: 20px; }
}

/* Compact account menu and shared responsive header */
@media (max-width: 900px) {
    .nav { gap: 14px; }
    .menu { gap: 14px; font-size: 13px; }
    .search-box { width: 190px; }
}
@media (max-width: 700px) {
    .nav { min-height: 70px; height: auto; flex-wrap: wrap; justify-content: space-between; padding: 10px 0; }
    .logo { font-size: 22px; }
    .menu { order: 3; width: 100%; justify-content: center; gap: 18px; padding-top: 8px; border-top: 1px solid #292929; }
    .search-box { width: min(34vw, 190px); height: 38px; }
    .search-icon { margin-right: 0; }
    .header-icons { gap: 6px; }
    .icon { width: 38px; height: 38px; }
}
@media (max-width: 420px) {
    .nav { column-gap: 8px; }
    .menu { gap: 12px; font-size: 12px; }
    .search-box { width: 112px; padding: 0 10px; }
    .search-box input { font-size: 10px; }
}

/* Account pages */
.auth-page {
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px 0 80px;
}
.auth-form {
    width: min(100%, 480px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 34px;
    border: 1px solid #2d2d2d;
    border-radius: 22px;
    background: #171717;
    box-shadow: 0 18px 50px rgba(0,0,0,.2);
}
.auth-form h1 {
    margin: 0 0 12px;
    font-size: 27px;
}
.auth-form label {
    margin-top: 8px;
    color: #ddd;
    font-size: 13px;
}
.auth-form input:not([type="hidden"]) {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #363636;
    border-radius: 10px;
    background: #101010;
    color: #f2f2f2;
    font: inherit;
    direction: rtl;
}
.auth-form input:focus {
    outline: 2px solid #8b7962;
    border-color: #8b7962;
}
.auth-form button { align-self: flex-start; margin-top: 15px; }
.auth-switch { color: #aaa; font-size: 13px; }
.auth-switch a { color: #d8c2a5; }
.auth-switch a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .auth-form { padding: 24px; }
}

/* ================= MOBILE RESPONSIVE FIX ================= */

@media (max-width: 600px) {

    /* جلوگیری از بیرون‌زدگی محتوا */
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    .container {
        width: 92%;
        max-width: 100%;
    }

    /* اندازه عکس محصولات در کارت‌ها */
    .product-image {
        height: 170px;
        overflow: hidden;
    }

    .product-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* نوشته‌های کارت محصول */
    .product-info {
        padding: 10px;
        min-width: 0;
    }

    .product-info h3 {
        font-size: 13px;
        line-height: 1.8;
        margin: 6px 0 10px;
        overflow-wrap: anywhere;
    }

    .product-category {
        font-size: 11px;
    }

    .product-bottom {
        gap: 6px;
        flex-wrap: wrap;
    }

    .product-bottom strong {
        font-size: 12px;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    /* صفحه جزئیات محصول */
    .product-detail-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px;
        gap: 16px;
    }

    .product-detail-image {
        display: block;
        width: 100%;
        height: 260px;
        min-height: 0;
        max-height: 280px;
        object-fit: contain;
    }

    .product-detail-info {
        min-width: 0;
    }

    .product-detail-info h1 {
        font-size: 21px;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    .product-detail-price {
        font-size: 16px;
    }

    .product-detail-description {
        font-size: 13px;
        line-height: 2;
        overflow-wrap: anywhere;
    }

    /* عنوان و متن صفحات */
    .category-page .section-title h1,
    .all-products-page .section-title h1,
    .favorites-page .section-title h1,
    .orders-page .section-title h1,
    .cart-page .section-title h1 {
        font-size: 24px;
        line-height: 1.8;
    }

    .category-hero {
        min-height: 180px;
        padding: 20px;
    }

    .category-hero h1 {
        font-size: 25px;
        line-height: 1.7;
    }

    .category-hero p {
        font-size: 12px;
        line-height: 1.9;
    }

    /* محصولات ویژه و محبوب */
    .product-carousel .product-card {
        flex-basis: 72vw;
        max-width: 280px;
    }

    .product-carousel .product-image {
        height: 190px;
    }

    /* فیلتر محصولات */
    .products-filter {
        min-width: 0;
        padding: 12px;
        gap: 10px;
    }

    .products-filter input,
    .products-filter select {
        width: 100%;
        min-width: 0;
        font-size: 13px;
    }

    /* توضیحات و نظرات */
    .product-description,
    .review-card p,
    .pending-review-body {
        font-size: 13px;
        line-height: 2;
        overflow-wrap: anywhere;
    }

    /* پنل حساب کاربری */
    .auth-form h1 {
        font-size: 23px;
        line-height: 1.8;
    }

    /* متن‌های طولانی */
    .payment-result p,
    .order-card p,
    .cart-empty {
        font-size: 13px;
        line-height: 2;
        overflow-wrap: anywhere;
    }
}

/* اصلاح منوی حساب کاربری و سبد خرید اولیس پوش */

.header-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.account-menu {
    position: relative;
    flex-shrink: 0;
}

.account-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-icon {
    flex-shrink: 0;
}

.account-menu-panel {
    left: auto;
    right: 0;
    width: min(220px, calc(100vw - 24px));
    min-width: 0;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
}

.account-menu-panel a,
.account-menu-panel .account-greeting,
.account-menu-panel .logout-form button {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .header-icons {
        gap: 8px;
    }

    .account-menu-panel {
        right: 0;
        left: auto;
        top: calc(100% + 8px);
        width: min(220px, calc(100vw - 24px));
    }
}
