* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vazirmatn", sans-serif;
}

body {
    background: #0f0f0f;
    color: #fff;
    overflow-x: hidden;
}

/* ---------- hero ---------- */
.products-hero1 {
    position: relative;
    padding: 150px 60px 0;
    overflow: hidden;
}

.products-hero-bg1 {
    position: absolute;
    inset: 0;
    height: 420px;
    background: url("img/bg-product.png") center/cover;
}

.products-hero1::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 420px;
    background: linear-gradient(to left, rgba(8, 8, 8, .95) 30%, rgba(8, 8, 8, .4) 100%);
}

.hero-content1 {
    position: relative;
    z-index: 2;
    max-width: 520px;
    margin-right: 0;
    margin-left: auto;
    padding-top: 20px;
    padding-bottom: 40px;
}

.hero-content1 h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-content1 h2 {
    font-size: 19px;
    color: #d6a44a;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-content1 p {
    font-size: 14px;
    line-height: 2;
    color: #ccc;
    margin-bottom: 26px;
}

.hero-buttons1 {
    display: flex;
    gap: 14px;
}

.hero-buttons1 a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13.5px;
}

.hero-buttons1 .outline {
    border: 1.5px solid rgba(255, 255, 255, .4);
    color: #fff;
}

.hero-buttons1 .gold {
    background: #d6a44a;
    color: #111;
}

/* ---------- search ---------- */
.search-wrap {
    position: relative;
    z-index: 2;
    padding: 0 60px 40px;
}

.search-field {
    position: relative;
    max-width: 1100px;
}

.search-field input {
    width: 100%;
    background: #12151d;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    padding: 16px 46px 16px 18px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
}

.search-field i {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #888;
}

/* ---------- category section ---------- */
.cat-section {
    padding: 0 60px 50px;
}

.cat-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.cat-head h3 {
    font-size: 20px;
    font-weight: 700;
}

.cat-head .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, rgba(214, 164, 74, .5), transparent);
}

.cat-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.scroll-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.scroll-btn:hover {
    background: #d6a44a;
    color: #111;
    border-color: #d6a44a;
}

.cat-track {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 230px;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.cat-track::-webkit-scrollbar {
    display: none;
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: #12151d;
    border: 1.5px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    padding: 28px 18px;
    cursor: pointer;
    transition: .25s;
}

.cat-card:hover {
    border-color: rgba(214, 164, 74, .4);
}

.cat-card.active {
    border-color: #d6a44a;
}

.cat-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
}

.cat-card h4 {
    font-size: 16px;
    font-weight: 700;
}

.cat-card.active h4 {
    color: #d6a44a;
}

.cat-card span {
    font-size: 12px;
    color: #999;
}

/* ---------- subcategory panel (ریلی، مثل ردیف دسته‌های بالا) ---------- */
.subcat-section {
    background: #12151d;
    padding: 40px 60px 70px;
    scroll-margin-top: 90px;
    /* برای sticky header، وقتی اسکرول میشه زیر هدر گم نشه */
}

.subcat-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.subcat-head h3 {
    font-size: 19px;
    font-weight: 700;
}

.subcat-head .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, rgba(214, 164, 74, .5), transparent);
}

.subcat-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.subcat-track {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 190px;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.subcat-track::-webkit-scrollbar {
    display: none;
}

.subcat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: #0f0f0f;
    border: 1.5px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: .25s;
}

.subcat-card:hover {
    border-color: rgba(214, 164, 74, .4);
}

.subcat-card.active {
    border-color: #d6a44a;
}

.subcat-card.active h5 {
    color: #d6a44a;
}

.subcat-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.subcat-card h5 {
    font-size: 14px;
    font-weight: 700;
}

.subcat-card span {
    font-size: 11px;
    color: #999;
}

/* ---------- final detail panel (متن + گالری) ---------- */
.detail-panel {
    background: #12151d;
    padding: 40px 60px 70px;
    scroll-margin-top: 90px;
}

.detail-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 34px;
    align-items: center;
}

.detail-gallery {
    display: block;
}

.gallery-main {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    display: block;
    margin-bottom: 12px;
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, .08);
    opacity: .6;
    transition: .25s;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active {
    border-color: #d6a44a;
    opacity: 1;
}

.detail-text h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #d6a44a;
}

.detail-text #detailDesc {
    font-size: 14px;
    line-height: 2.1;
    color: #ddd;
    margin-bottom: 26px;
}

.detail-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-specs li {
    font-size: 13.5px;
    color: #ddd;
    line-height: 1.9;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.detail-specs li:last-child {
    border-bottom: none;
}

.detail-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.detail-actions a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13.5px;
}

.detail-actions .gold {
    background: #d6a44a;
    color: #111;
}

.detail-actions .outline {
    border: 1.5px solid rgba(255, 255, 255, .35);
    color: #fff;
}

@media(max-width:992px) {
    header {
        padding: 14px 20px;
    }

    nav,
    .header-phone {
        display: none;
    }

    .products-hero {
        padding: 40px 20px 0;
    }

    .hero-content {
        margin: 0 auto;
        text-align: center;
        max-width: 100%;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .search-wrap,
    .cat-section,
    .subcat-section,
    .detail-panel {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cat-track {
        grid-auto-columns: 190px;
    }

    .subcat-track {
        grid-auto-columns: 160px;
    }

    .detail-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .detail-actions {
        justify-content: center;
    }
}

@media(max-width:600px) {
    .cat-track {
        grid-auto-columns: 160px;
    }

    .cat-card {
        padding: 20px 12px;
    }

    .cat-card img {
        height: 70px;
    }

    .subcat-track {
        grid-auto-columns: 140px;
    }

    .gallery-main {
        height: 220px;
    }

    .gallery-thumb {
        width: 70px;
        height: 56px;
    }
}


/* اصلاح هیرو محصولات در حالت ریسپانسیو */
@media (max-width: 768px) {

    .products-hero1 {
        padding: 110px 20px 40px;
        overflow: hidden;
    }

    .products-hero-bg1 {
        inset: 0;
        height: 100%;
        background-size: cover;
        background-position: center;
    }

    .products-hero1::after {
        top: 0;
        bottom: 0;
        height: auto;
    }

    .hero-content1 {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 20px 0 30px;
        margin: 0;
    }

    .hero-buttons1 {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .hero-buttons1 a {
        box-sizing: border-box;
        justify-content: center;
        max-width: 100%;
    }
}
