﻿:root {
    --container-max: 1260px;
    --blue-grad: linear-gradient(90deg, #1c2746, #1f2e57);
    --red-grad: linear-gradient(90deg, #ff4a2a, #e43f22);
    --line: #e5ebf5;
}

body {
    background: #f6f8fc;
    color: #1f2937;
    overflow-x: hidden;
}

.safe-container {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
}

.menu-item.all-categories > a {
    background: rgba(0,0,0,.16);
}

.menu-item.all-categories:hover > a {
    background: rgba(0,0,0,.24);
}

.allcat-dropdown {
    width: 318px;
    padding: 0;
    border-top: none;
    overflow: visible;
    background: #fff;
    list-style: none;
}

    .allcat-dropdown > li {
        position: static;
        overflow: visible;
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 52px;
        padding: 0 14px;
        border-bottom: 1px solid #f3f4f6;
        cursor: pointer;
        background: #fff;
    }

        .allcat-dropdown > li:last-child {
            border-bottom: none;
        }

        .allcat-dropdown > li::after {
            content: "\25B8";
            margin-left: auto;
            color: #a3afc9;
            font-size: 12px;
        }

        .allcat-dropdown > li:hover {
            background: #fff3ef;
            color: #e43f22;
        }

    .allcat-dropdown .category-flyout {
        position: absolute;
        left: 100%;
        top: 0px;
        margin-top: 0;
        transform: none;
        width: calc(var(--container-max) - 100% - 24px);
        min-height: 100%;
        height: auto;
        background: #fff;
        box-shadow: 0 12px 30px rgba(0,0,0,.1);
        display: none;
        padding: 16px;
        white-space: normal;
        border: none;
    }

        .allcat-dropdown .category-flyout .sub-col-title a:hover,
        .allcat-dropdown .category-flyout .sub-links a:hover {
            background: transparent !important;
        }

    .allcat-dropdown > li:hover .category-flyout {
        display: block;
    }

.breadcrumb-strip {
    background: #f3f6fb;
    border-top: 1px solid #e8edf6;
    border-bottom: 1px solid #e8edf6;
}

    .breadcrumb-strip .breadcrumb {
        margin: 0;
        padding: 10px 0;
    }

.breadcrumb a {
    text-decoration: none;
}

.detail-section {
    padding: 20px 0 12px;
}

.detail-card {
    background: transparent;
    border: none;
    padding: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    gap: 22px;
}

.gallery-stage {
    position: relative;
    overflow: visible;
}

.gallery-main {
    height: 490px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex: 1 1 auto;
}

    .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.zoom-lens {
    position: absolute;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(255,255,255,.95);
    background: rgba(255,255,255,.28);
    box-shadow: 0 0 0 1px rgba(20,34,64,.2);
    pointer-events: none;
    display: none;
}

.zoom-pane {
    position: absolute;
    left: calc(100% + 22px);
    top: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--line);
    background: #fff center/cover no-repeat;
    display: none;
    z-index: 5;
}

.thumbs-slider {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.thumb-nav {
    width: 28px;
    height: 76px;
    border: 1px solid #d7dfed;
    background: #fff;
    color: #64748b;
    flex: 0 0 auto;
}

    .thumb-nav:hover {
        color: #ff4a2a;
        border-color: #ffb7aa;
        background: #fff7f5;
    }

.thumbs-viewport {
    overflow: hidden;
    flex: 1 1 auto;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

    .gallery-thumbs::-webkit-scrollbar {
        display: none;
    }

    .gallery-thumbs img {
        width: 76px;
        height: 76px;
        object-fit: cover;
        border: 1px solid #d7dfed;
        cursor: pointer;
        flex: 0 0 auto;
    }

        .gallery-thumbs img.active {
            border-color: #ff4a2a;
        }

.pd-title {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    color: #111827;
}

.pd-sub {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: #e43f22;
}

.pd-price-head {
    background: var(--red-grad);
    color: #fff;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

.pd-price-body {
    border: 1px solid var(--line);
    border-top: none;
    padding: 10px 12px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pd-price {
    font-size: 24px;
    color: #1c2746;
    font-weight: 800;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.pd-stock {
    color: #16a34a;
    font-weight: 700;
    font-size: 14px;
}

.pd-meta {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

    .pd-meta td {
        padding: 10px 4px;
        border-bottom: 1px solid #edf1f8;
        font-size: 14px;
    }

        .pd-meta td:first-child {
            width: 140px;
            color: #4b5563;
        }

        .pd-meta td:last-child {
            font-weight: 600;
            color: #111827;
        }

.qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.qty-label {
    width: 140px;
    color: #4b5563;
    font-size: 14px;
}

.qty-box {
    display: flex;
    border: 1px solid #d7dfed;
    height: 42px;
}

    .qty-box button {
        width: 38px;
        border: none;
        background: #f7f9fc;
        color: #374151;
    }

    .qty-box input {
        width: 68px;
        border: none;
        text-align: center;
        font-size: 16px;
    }

.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-buy, .btn-cart {
    height: 48px;
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-buy {
    background: #ff7a1a;
}

.btn-cart {
    background: #22b04b;
}

.btn-mini {
    width: 48px;
    height: 48px;
    border: 1px solid #d7dfed;
    background: #fff;
    color: #e43f22;
    font-size: 20px;
    transition: transform .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}

.pd-actions .btn-buy:hover,
.pd-actions .btn-cart:hover {
    filter: brightness(1.20);
}

.pd-actions .btn-mini:hover {
    color: #ff4a2a;
    border-color: #ffb7aa;
    background: #fff7f5;
}

.detail-tabs {
    margin-top: 16px;
    border: 1px solid #d7dfed;
    display: grid;
    grid-template-columns: repeat(4,1fr);
}

    .detail-tabs a {
        text-align: center;
        text-decoration: none;
        color: #374151;
        font-weight: 600;
        padding: 11px 8px;
        border-right: 1px solid #d7dfed;
    }

        .detail-tabs a:last-child {
            border-right: none;
        }

        .detail-tabs a.active {
            background: #1f2e57;
            color: #fff;
        }

.tab-panel {
    border: 1px solid #d7dfed;
    border-top: none;
    background: #fff;
    padding: 20px;
    display: none;
}

    .tab-panel.active {
        display: block;
    }

.desc-panel {
    border: 1px solid #d7dfed;
    border-top: none;
    background: #fff;
    padding: 20px;
}

    .desc-panel h3 {
        margin: 0 0 10px;
        font-size: 24px;
    }

    .desc-panel p {
        margin: 0 0 8px;
        color: #374151;
        line-height: 1.7;
    }

.related-section {
    padding: 14px 0 26px;
}

.related-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .related-head h4 {
        margin: 0;
        font-size: 22px;
        font-weight: 800;
        color: #1c2746;
    }

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

    .related-products-grid .product-card {
        margin-bottom: 0;
    }

@media (max-width: 992px) {
    .menu-bar .safe-container > ul {
        flex-wrap: wrap;
    }

    .menu-item > a {
        padding: 12px 12px;
    }

    .header-tools {
        display: none;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .gallery-stage {
        position: relative;
    }

    .gallery-main {
        height: 340px;
    }

    .zoom-pane, .zoom-lens {
        display: none !important;
    }

    .detail-tabs {
        grid-template-columns: repeat(2,1fr);
    }

    .allcat-dropdown {
        width: 100%;
    }

        .allcat-dropdown .category-flyout {
            position: static;
            width: 100%;
            box-shadow: none;
            display: none !important;
        }

    .related-products-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .pd-price-body {
        gap: 8px;
        flex-wrap: wrap;
    }

    .pd-price {
        font-size: 20px;
    }
}
