.products-page {
    padding-top: 100px;
    padding-bottom: 5rem;
    background-color: var(--bg-cream);
    min-height: 100vh;
}

.products-hero {
    padding: 5rem 5% 3rem 5%;
    text-align: center;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #C84A4A;
    margin-bottom: 1rem;
    font-weight: 600;
}

.products-main-title {
    font-family: 'Pacifico', cursive;
    font-size: 3.2rem;
    color: #C84A4A;
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.2;
    white-space: nowrap;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 4rem;
    margin: 2rem 0;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}


.search-container {
    position: relative;
    width: 350px;
    min-width: 280px;
    flex-shrink: 0;
}

.search-container i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-leaf);
    z-index: 1;
    font-size: 1rem;
}

.search-container input {
    width: 100%;
    padding: 1rem 1.2rem 1rem 45px;
    border: 2px solid rgba(47, 93, 80, 0.15);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg-cream);
    outline: none;
    transition: all 0.3s ease;
}

.search-container input:focus,
.search-container input:active {
    border-color: #2F5D50;
    background: white;
    box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.15);
}

.search-container:focus-within i {
    color: #2F5D50;
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.filter-options i {
    color: var(--light-leaf);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.filter-options select {
    padding: 1rem 2.5rem 1rem 1.2rem;
    border: 2px solid rgba(47, 93, 80, 0.15);
    border-radius: 12px;
    background: var(--bg-cream);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--main-heading);
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    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='%232F5D50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    min-width: 180px;
}

.filter-options select:focus,
.filter-options select:active {
    border-color: #2F5D50;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.15);
}

.filter-options:focus-within i {
    color: #2F5D50;
}

.sort-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-container i {
    color: var(--light-leaf);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sort-container select {
    padding: 1rem 2.5rem 1rem 1.2rem;
    border: 2px solid rgba(47, 93, 80, 0.15);
    border-radius: 12px;
    background: var(--bg-cream);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--main-heading);
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    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='%232F5D50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    min-width: 160px;
}

.sort-container select:focus,
.sort-container select:active {
    border-color: #2F5D50;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.15);
}

.sort-container:focus-within i {
    color: #2F5D50;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem 4rem 4rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: transparent;
}

.product-image-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.product-image {
    position: relative;
    aspect-ratio: 4.5/5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.2rem;
    background: #eee;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.sold-out-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--berry-accent);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
}

.product-info {
    text-align: left;
}

.product-name-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.product-name {
    font-size: 1.25rem;
    color: #C84A4A;
    margin-bottom: 0.8rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.product-name-link:hover .product-name {
    color: var(--main-heading);
    text-decoration: underline;
}

.product-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1rem;
}

.price-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--main-heading);
}

.original-price {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--light-leaf);
}

.discount-tag {
    font-size: 0.85rem;
    color: #4CAF50;
    font-weight: 700;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #C84A4A;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.add-to-cart-btn:hover {
    background: #B83A3A;
}

.add-to-cart-btn i {
    font-size: 1rem;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0 8rem;
    margin-bottom: 2rem;
    width: 100%;
}

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 3rem;
    background: #C84A4A;
    color: white;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(200, 74, 74, 0.3);
}

.load-more-btn:hover {
    background: #B83A3A;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(200, 74, 74, 0.4);
}

.load-more-btn:active {
    transform: translateY(-1px);
}

.load-more-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: translateY(3px);
}

/* Footer Waves Adjustment */
.waves-area {
    position: relative;
    width: 100%;
    height: 100px;
    background: var(--bg-cream);
    margin-top: -100px;
}

/* Responsiveness */
@media (max-width: 1200px) {
    .products-hero {
        padding: 3.5rem 4% 2.5rem 4%;
    }

    .products-main-title {
        font-size: 2.8rem;
        white-space: normal;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        padding: 2rem 3rem 8rem 3rem;
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 2rem 2rem 8rem 2rem;
    }
}

@media (max-width: 768px) {
    .products-page {
        padding-bottom: 4rem;
    }

    .products-hero {
        padding: 3rem 4% 2rem 4%;
    }

    .products-main-title {
        font-size: 2.2rem;
        white-space: normal;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem 2rem;
    }

    .search-container {
        width: 100%;
        min-width: 100%;
    }

    .filter-options {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-options i {
        display: none;
    }

    .filter-options select {
        width: 100%;
        min-width: 100%;
    }

    .sort-container {
        width: 100%;
        justify-content: flex-start;
    }

    .sort-container i {
        display: none;
    }

    .sort-container select {
        width: 100%;
        min-width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem 8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .products-main-title {
        font-size: 1.8rem;
        white-space: normal;
    }
}

/* Product Detail Page Styles */
.product-detail-page {
    padding-top: 100px;
    background-color: var(--bg-cream);
    min-height: 100vh;
    padding-bottom: 5rem;
}

.product-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 4rem 5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.product-detail-image-section {
    position: sticky;
    top: 120px;
}

.main-product-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 40px rgba(47, 93, 80, 0.15);
    background: white;
}

.main-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-product-image:hover img {
    transform: scale(1.02);
}

.thumbnail-images {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(47, 93, 80, 0.1);
}

.thumbnail:hover {
    border-color: #C84A4A;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(200, 74, 74, 0.2);
}

.thumbnail.active {
    border-color: #C84A4A;
    box-shadow: 0 6px 20px rgba(200, 74, 74, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-detail-name {
    font-family: 'Pacifico', cursive;
    font-size: 3rem;
    color: #C84A4A;
    margin: 0;
    line-height: 1.2;
}

.product-detail-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #C84A4A;
    font-size: 1rem;
    font-weight: 600;
}

.product-detail-category i {
    color: #C84A4A;
}

.product-detail-price {
    margin: 1rem 0;
}

.detail-current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--main-heading);
}

.product-detail-description {
    margin-top: 1rem;
}

.product-detail-description h3,
.product-detail-features h3 {
    font-size: 1.5rem;
    color: var(--main-heading);
    margin-bottom: 1rem;
    font-weight: 700;
}

.product-detail-description p {
    color: var(--body-text);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.product-detail-features {
    margin-top: 1rem;
}

.product-detail-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-detail-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--body-text);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.product-detail-features li i {
    color: #C84A4A;
    font-size: 1rem;
}

.product-detail-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(47, 93, 80, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-selector label {
    font-weight: 600;
    color: var(--main-heading);
    font-size: 1.1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-cream);
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    color: var(--main-heading);
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #C84A4A;
    color: white;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--main-heading);
    outline: none;
}

.detail-add-to-cart-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: #C84A4A;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(200, 74, 74, 0.3);
}

.detail-add-to-cart-btn:hover {
    background: #B83A3A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 74, 74, 0.4);
}

.detail-add-to-cart-btn i {
    font-size: 1.2rem;
}

/* Related Products Section */
.related-products-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 4rem 10rem;
}

.related-products-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.5rem;
    color: #C84A4A;
    text-align: center;
    margin-bottom: 3rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.related-product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(47, 93, 80, 0.1);
    transition: transform 0.3s ease;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(47, 93, 80, 0.15);
}

.related-product-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-info {
    padding: 1.5rem;
    text-align: center;
}

.related-product-info h4 {
    font-size: 1.2rem;
    color: #C84A4A;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.related-product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--main-heading);
    margin-bottom: 1rem;
}

.related-product-link {
    display: inline-block;
    color: #C84A4A;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.related-product-link:hover {
    color: var(--main-heading);
    text-decoration: underline;
}

/* Responsive for Product Detail */
@media (max-width: 1024px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 3rem 4rem;
    }

    .product-detail-image-section {
        position: relative;
        top: 0;
    }

    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-detail-page {
        padding-bottom: 4rem;
    }

    .product-detail-container {
        padding: 2rem 2rem 3rem;
        gap: 2.5rem;
    }

    .product-detail-name {
        font-size: 2.2rem;
    }

    .detail-current-price {
        font-size: 2rem;
    }

    .product-detail-actions {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .related-products-section {
        padding: 3rem 2rem 8rem;
    }

    .related-products-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 1.5rem 1.5rem 2.5rem;
    }

    .product-detail-name {
        font-size: 1.8rem;
    }

    .detail-current-price {
        font-size: 1.75rem;
    }

    .thumbnail-images {
        gap: 0.75rem;
    }

    .thumbnail {
        width: 80px;
        height: 80px;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
    }
}