/* =============================================
   SHOP PAGE STYLES
   ============================================= */

/* Shop Header */
.shop-header {
    background: linear-gradient(135deg, var(--color-dark) 0%, #2a2a3e 100%);
    padding: var(--space-2xl) 0;
    color: #fff;
}

.shop-header-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.shop-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

@media (max-width: 768px) {
    .shop-header {
        padding: var(--space-xl) 0;
        text-align: center;
    }
}

.shop-result-count {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px !important;
    white-space: nowrap;
}

/* Shop Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

/* Sidebar */
.shop-sidebar {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    padding: var(--space-lg);
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.shop-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.shop-sidebar-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.shop-sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-light);
    cursor: pointer;
}

/* Filter Groups */
.filter-group {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: var(--space-md);
}

.filter-list li {
    margin-bottom: 4px;
}

.filter-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.filter-list a:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.filter-list a.active {
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    font-weight: 500;
}

.filter-list a span {
    color: var(--color-text-light);
    font-size: 11px;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.price-inputs input {
    padding: 8px 10px;
    font-size: 13px;
}

.price-inputs span {
    color: var(--color-text-light);
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.shop-filter-toggle {
    display: none;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-dark);
    font-size: 13px;
    cursor: pointer;
}

.shop-sort {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-left: auto;
}

.shop-sort label {
    font-size: 13px;
    color: var(--color-text-light);
    white-space: nowrap;
}

.shop-sort select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    color: var(--color-dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23444' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* No Results */
.shop-no-results {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    color: var(--color-text-light);
}

.shop-no-results i {
    font-size: 48px;
    margin-bottom: var(--space-lg);
    color: var(--color-border);
}

.shop-no-results h3 {
    margin-bottom: var(--space-sm);
}

.shop-no-results p {
    margin-bottom: var(--space-lg);
}

/* =============================================
   PRODUCT PAGE STYLES
   ============================================= */

:root {
    --space-5xl: 120px;
}

/* Product Detail Layout */
.product-detail {
    padding-bottom: 5px;
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 992px) {
    .product-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--space-2xl);
        align-items: start;
        margin-bottom: var(--space-3xl);
    }
}

/* Gallery */
.product-gallery {
    width: 100%;
}

@media (min-width: 992px) {
    .product-gallery {
        position: sticky;
        top: calc(var(--header-height) + 20px);
        z-index: 5;
    }
}

.product-gallery-main,
.product-main-swiper,
.product-thumb-swiper,
.swiper-slide {
    max-width: 100% !important;
}

.product-gallery-main {
    width: 100%;
    max-width: 500px;
    /* Force 500px */
    height: 500px;
    /* Force 500px */
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden !important;
    background: #fff;
    border: 1px solid var(--color-border-light);
    cursor: zoom-in;
    margin: 0 auto var(--space-md);
    /* Centered and space below */
}

.product-main-swiper {
    height: 100% !important;
}

.product-gallery-main .swiper-slide {
    height: 100% !important;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    /* Ensure full image visibility */
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.product-gallery-thumbs {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-bottom: var(--space-lg) !important;
}

.product-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--color-border-light);
    cursor: pointer;
    transition: border-color var(--transition-fast);
    flex-shrink: 0;
}

.product-thumb.active,
.product-thumb:hover {
    border-color: var(--color-primary);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure consistent card image heights */
.product-card-image {
    aspect-ratio: 1 / 1 !important;
}

.product-card-image img {
    height: 100% !important;
    object-fit: cover !important;
}

/* Product Info */
.product-info {
    background: #ffffff;
    padding: 30px !important;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
}

.product-info-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.product-info h1 {
    font-size: 1.8rem;
    margin-bottom: var(--space-md);
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.product-meta-row .star-rating {
    font-size: 14px;
}

.product-meta-row .review-count {
    font-size: 13px;
    color: var(--color-text-light);
}

.product-sku {
    font-size: 12px;
    color: var(--color-text-light);
}

/* Product Price Block */
.product-price-block {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.product-price-block .price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dark);
}

.product-price-block .price-original {
    font-size: 1.1rem;
    margin-left: var(--space-sm);
}

.product-price-block .price-discount {
    font-size: 14px;
    background: rgba(46, 125, 50, 0.1);
    color: var(--color-success);
    padding: 4px 10px;
    border-radius: 50px;
    margin-left: var(--space-sm);
}

.product-price-tax {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

/* Stock indicator */
.product-stock {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: 13px;
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}


.stock-in {
    background: var(--color-success);
}

.stock-out {
    background: var(--color-error);
}

/* Short Description */
.product-short-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

/* Add to Cart Section */
.product-add-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.purchase-actions .add-to-cart-btn {
    flex: 1;
    min-width: 200px;
    padding: 14px;
    font-size: 15px;
}

.wishlist-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.wishlist-btn:hover,
.wishlist-btn.active {
    color: var(--color-sale);
    border-color: var(--color-sale);
}

/* Features strip */
.product-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.product-feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--color-text);
}

.product-feature-item i {
    color: var(--color-primary);
    font-size: 16px;
    flex-shrink: 0;
}

/* Stone Details */
.stone-details {
    background: var(--color-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--color-border-light);
}

.stone-details h4 {
    margin-bottom: var(--space-md);
    font-size: 16px;
}

.stone-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
}

.stone-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stone-row .label {
    color: var(--color-text-light);
}

.stone-row .value {
    font-weight: 600;
}

.product-tabs {

    clear: both;
    z-index: 1;
    margin-top: 60px;
}

.product-tabs-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    background: #f5f5f5 !important;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    pointer-events: auto;
}

@media (min-width: 992px) {
    .product-tabs-nav {
        position: sticky;
        top: var(--header-height);
        z-index: 10;
    }
}

.product-tabs-nav button {
    padding: 16px 28px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.product-tabs-nav button.active,
.product-tabs-nav button:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.05);
}

.product-tabs-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: -1px;
    /* Bridge any thin sub-pixel gap */
    pointer-events: auto;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tab-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text);
}

.tab-content h3 {
    margin-bottom: var(--space-md);
}

.tab-content ul {
    list-style: disc;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.tab-content ul li {
    margin-bottom: var(--space-sm);
}

/* Reviews Section */
.reviews-section {
    margin-top: var(--space-lg);
}

.review-summary {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.review-avg {
    text-align: center;
}

.review-avg .big-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1;
}

.review-avg .out-of {
    font-size: 14px;
    color: var(--color-text-light);
}

.review-item {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.review-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.review-item-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-dark);
}

.review-item-date {
    font-size: 12px;
    color: var(--color-text-light);
}

.review-item-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    margin-top: var(--space-sm);
}

/* Review Form */
.review-form {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.review-form h4 {
    margin-bottom: var(--space-md);
}

.star-selector {
    display: flex;
    gap: 4px;
    margin-bottom: var(--space-md);
}

.star-selector i {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.star-selector i.active,
.star-selector i:hover {
    color: var(--color-warning);
}

/* Related Products */
.related-products {
    margin-top: var(--space-3xl);
}

/* =============================================
   SHOP PAGE - RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 220px 1fr;
    }

    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .product-detail {
        gap: var(--space-xl);
    }
}

@media (max-width: 768px) {
    .shop-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .shop-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100%;
        z-index: 3000;
        border-radius: 0;
        overflow-y: auto;
        transition: left var(--transition-base);
    }

    .shop-sidebar.active {
        left: 0;
    }

    .shop-sidebar-close {
        display: block;
    }

    .shop-filter-toggle {
        display: flex;
        height: 44px;
        /* Standardize tap target height */
        align-items: center;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .product-gallery {
        position: static;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
        width: 100%;
        height: auto !important;
    }

    .product-main-swiper {
        height: auto !important;
        max-height: 500px;
        min-height: 300px;
    }

    .product-info {
        padding: 20px !important;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .product-info h1 {
        font-size: 1.4rem;
    }

    .product-features {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        width: 100% !important;
    }

    .product-feature-item {
        padding: 10px 5px !important;
        text-align: center !important;
        flex-direction: column !important;
        font-size: 10px !important;
    }

    .product-feature-item i {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }

    .purchase-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        margin-top: 10px !important;
        margin-bottom: 20px !important;
    }

    .purchase-actions .qty-selector {
        width: auto !important;
        flex-shrink: 0 !important;
    }

    .purchase-actions .add-to-cart-btn {
        flex: 1 !important;
        width: auto !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
        height: 45px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .wishlist-btn {
        width: 45px !important;
        height: 45px !important;
        margin-top: 0 !important;
        flex-shrink: 0 !important;
    }

    .review-summary {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .product-gallery-thumbs {
        overflow-x: auto;
    }

    .product-price-block .price-current {
        font-size: 1.5rem;
    }

    .product-tabs-nav button {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Shop Sidebar Overlay */
.shop-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.shop-sidebar-overlay.active {
    display: block;
    opacity: 1;
}