/* Products Page Styles */

.products-page {
    min-height: 100vh;
    background-color: #fff9e7;
}

/* Category Navigation Section */
.category-section {
    background-color: #f8f8f8;
    padding: 24px 0;
    /* border-bottom: 1px solid #e5e5e5; */
    position: sticky;
    top: 65px; /* Stick below the header */
    z-index: 999; /* Just below header but above content */
    background-color: #fff9e7;
}

.category-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.category-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    min-width: min-content;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: translateY(-2px);
}

.category-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-item.active .category-avatar {
    background-color: #d4af37;
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
}

.category-item.active .category-image-placeholder {
    color: #ffffff;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5aa03;
    text-align: center;
    white-space: nowrap;
}

.category-item.active .category-name {
    color: #000000;
    font-weight: 600;
}

/* Page Title Section */
.page-title-section {
    padding: 40px 0 30px;
    text-align: center;
    /* background-color: #ffffff; */
}

.page-title {
  font-size: 3rem;
    font-weight: 500;
    color: #e5aa03;
    margin: 0 0 12px 0;
}

.page-subtitle {
    font-size: 14px;  
    color: #666666;
    margin: 0;
}

/* Products Section */
.products-section {
    padding: 0 0 60px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5aa03;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-dropdowns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Clear Filters Button */
.clear-filters-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background-color: #fff9e7;
    border: 1px solid #e5aa03;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #e5aa03;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.clear-filters-btn:hover {
    background-color: #ff4444;
    border-color: #ff4444;
    color: #ffffff;
}

.clear-filters-btn svg {
    width: 14px;
    height: 14px;
}

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #fff9e7;
    border: 1px solid #e5aa03;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #e5aa03;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.filter-dropdown-btn:hover {
    border-color: #000000;
    color: #000000;
}

.filter-dropdown-btn.active {
    border-color: #000000;
    color: #000000;
}

.filter-dropdown-btn svg {
    transition: transform 0.3s ease;
}

.filter-dropdown-btn.active svg {
    transform: rotate(180deg);
}

.filter-dropdown-content {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background-color: #fff9e7;
    border: 1px solid #e5aa03;
    border-radius: 4px;
    padding: 12px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.filter-dropdown-content.active {
    display: block;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: #333333;
}

.filter-option:hover {
    color: #000000;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-option span {
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-option .color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.filter-option sup {
    color: #999999;
    font-size: 11px;
    margin-left: 4px;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: #fff9e7;
    border: 1px solid #e5aa03;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #e5aa03;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    border-color: #e5aa03;
    color: #e5aa03;
}

.view-btn.active {
    background-color: #e5aa03;
    border-color: #e5aa03;
    color: #ffffff;
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

.sort-select {
    padding: 10px 16px;
    background-color: #fff9e7;
    border: 1px solid #e5aa03;
    border-radius: 4px;
    font-size: 14px;
    color: #e5aa03;
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 200px;
}

.sort-select:focus {
    outline: none;
    border-color: #000000;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.products-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.products-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

/* Product Card */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    display: flex;
    flex-direction: column;
    /* background-color: #ffffff; */
    transition: transform 0.3s ease;
}

.product-card-link:hover .product-card {
    transform: translateY(-4px);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    overflow: hidden;
    background-color: #f5f5f5;
    margin-bottom: 16px;
    border-radius: 0;
}

/* Product Image Slider */
.product-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.product-slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-slide-img.active {
    opacity: 1;
}

.product-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image-wrapper:hover .product-slider-dots {
    opacity: 1;
}

.product-slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.product-slider-dot.active {
    background: #ffffff;
}

/* Slider Arrow Buttons */
.product-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
    padding: 0;
}

.product-image-wrapper:hover .product-slider-arrow {
    opacity: 1;
}

.product-slider-arrow:hover {
    background: #ffffff;
}

.product-slider-prev {
    left: 8px;
}

.product-slider-next {
    right: 8px;
}

/* Add to Cart Button on Image */
.product-add-to-cart-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #e5aa03;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-add-to-cart-btn svg {
    stroke: #fff;
}

.product-card.size-selected .product-add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

.product-add-to-cart-btn:hover {
    background: #e5b800;
}

.product-add-to-cart-btn:hover svg {
    stroke: #fff;
}

/* Size Options */
.product-size-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.product-size-btn {
    padding: 4px 10px;
    border: 1px solid #e5aa03;
    background: transparent;
    font-size: 0.75rem;
    font-family: "Noto Serif", serif;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #000000;
    font-weight: 700;
}

.product-size-btn:hover {
    border-color: #000;
}

.product-size-btn.active {
    background: #ffbd00;
    color: #fff;
    border-color: #ffbd00;
}

.product-size-btn.out-of-stock {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
    pointer-events: none;
}

.product-stock-message {
    margin-top: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #e74c3c;
    animation: pulse-stock-list 1.5s ease-in-out infinite;
}

@keyframes pulse-stock-list {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* AED Icon */
.aed-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    display: none; /* Hidden by default to match screenshot */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.product-card:hover .wishlist-btn {
    display: flex; /* Show on hover */
}

.wishlist-btn:hover {
    background-color: #d4af37;
    color: #ffffff;
}

.wishlist-btn:hover svg path {
    stroke: #ffffff;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    z-index: 10;
    letter-spacing: 0.5px;
}

.product-badge.new {
    background-color: #000000;
    color: #ffffff;
}

.product-badge.sale {
    background-color: #000000;
    color: #ffffff;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
}

.product-name {
    font-size: 1rem;
    font-weight: 500;
    color: #e5aa03;;
    margin: 0;
    line-height: 1.4;
    font-family: "Noto Serif", serif;
}

.product-price-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.product-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e5aa03;
    margin: 0;
    font-family: "Noto Serif", serif;
}

.product-price.sale-text {
    color: #ff7448;
}

.product-price-old {
    font-size: 0.8rem;
    color: #999;
    text-decoration: line-through;
    margin: 0;
    font-weight: 500;
}

.product-discount-badge {
    background: #ff7448;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.aed-icon-small {
    height: 11px;
    width: auto;
    vertical-align: middle;
}

.product-colors {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-dot:hover {
    transform: scale(1.2);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    border-color: #000000;
    color: #000000;
}

.page-item.active .page-link {
    background-color: #000000;
    border-color: #000000;
    color: #ffffff;
}

.page-item.disabled .page-link {
    color: #999999;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    border-color: #e5e5e5;
    color: #999999;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .products-grid[data-columns="2"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid[data-columns="3"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-actions {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select {
        min-width: auto;
        flex: 1;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .products-grid[data-columns="2"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .category-section {
        padding: 16px 0;
    }

    .category-nav {
        gap: 16px;
        padding: 0 16px;
        justify-content: flex-start;
    }

    .category-avatar {
        width: 70px;
        height: 70px;
    }

    .category-name {
        font-size: 13px;
    }

    .page-title-section {
        padding: 30px 0 24px;
    }

    .page-title {
        font-size: 26px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .filter-dropdowns {
        width: 100%;
    }

    .filter-dropdown {
        flex: 1;
        min-width: 0;
    }

    .filter-dropdown-btn {
        width: 100%;
        justify-content: space-between;
    }

    .view-toggle {
        gap: 6px;
    }

    .view-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .category-avatar {
        width: 60px;
        height: 60px;
    }

    .category-name {
        font-size: 12px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        font-size: 12px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .products-grid[data-columns="2"] {
        grid-template-columns: 1fr;
    }

    .products-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-dropdowns {
        flex-direction: column;
    }

    .filter-dropdown-btn {
        font-size: 11px;
        padding: 8px 12px;
    }

    .view-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .sort-select {
        font-size: 13px;
        padding: 8px 12px;
    }
}
