/**
 * Sweets Website
 * =============================================================
 * File: cart.css
 * Description: Styling for the cart page
 * Author: Sweets Website Team
 * Version: 1.0.0
 * =============================================================
 */

html {
    scroll-behavior: smooth;
}

.p-cart-page {
    background-color: var(--clr-bg-warm);
    min-height: 80vh;
}

/* Integrated Cart Breadcrumb */
.c-cart-main .c-breadcrumb__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.c-cart-main .c-breadcrumb__link {
    text-decoration: none;
    transition: opacity 0.2s;
}

.c-cart-main .c-breadcrumb__link:hover {
    opacity: 0.8;
}

.c-cart-items-card {
    border: 1px solid rgba(125, 28, 28, 0.05);
}

.c-cart-item__img-wrapper {
    width: 100px;
    height: 100px;
    background-color: #f9f9f9;
    padding: 5px;
}

.c-cart-item__img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.c-cart-item__img-wrapper:hover img {
    transform: scale(1.1);
}

.c-quantity-selector {
    background-color: #fff;
    min-width: 110px;
    justify-content: space-between;
}

.c-quantity-selector .btn {
    border: none;
    color: var(--clr-secondary);
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.c-quantity-selector .btn:hover {
    background-color: rgba(125, 28, 28, 0.05);
}

.c-order-summary {
    border: 1px solid rgba(125, 28, 28, 0.05);
}

/* Custom Primary Button for Cart Page */
.c-btn-primary {
    background-color: var(--clr-secondary);
    color: var(--clr-white);
    border: none;
    padding: 12px 24px;
    font-weight: var(--fw-bold);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.c-btn-primary:hover {
    background-color: var(--clr-primary);
    color: var(--clr-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

/* Cart Item Card Responsiveness */
@media (max-width: 767.98px) {
    .c-cart-item-card {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
    }

    .c-cart-item-img-wrap {
        width: 100% !important;
        height: 200px !important;
    }

    .c-cart-item-img-wrap img {
        object-fit: contain !important;
    }

    .c-cart-item-card .d-flex.align-items-center.gap-5 {
        width: 100%;
        justify-content: space-between;
        gap: 1rem !important;
    }
}

/* Table Enhancements */
.table> :not(caption)>*>* {
    padding: 1.5rem 0.75rem;
}

/* Breadcrumb Styling */
.breadcrumb-item a {
    color: var(--clr-text-muted);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--clr-secondary);
    font-weight: var(--fw-medium);
}

.border-dashed {
    border-style: dashed !important;
}

/* --- Product Hero Section --- */
:root {
    --product-hero-gallery-height: 540px;
    --product-hero-thumb-width: 100px;
}

.c-product-hero {
    background: transparent;
}

.c-product-hero__gallery-wrap {
    height: var(--product-hero-gallery-height);
    display: flex;
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 991px) {
    .c-product-hero__gallery-wrap {
        flex-direction: column-reverse;
        height: auto;
    }

    .c-thumb-gallery {
        width: 100% !important;
        height: 100px;
    }

    .c-thumb-item {
        height: 80px !important;
        width: 80px !important;
    }

    .c-main-image-container {
        height: 400px !important;
    }
}

.c-breadcrumb__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.c-breadcrumb__link {
    color: var(--clr-text-muted);
    text-decoration: none;
}

.c-breadcrumb__item:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: #e6a371;
}

.c-breadcrumb__item--active {
    color: var(--clr-secondary);
    font-weight: 500;
}

/* Thumbs */
.c-thumb-gallery {
    width: var(--product-hero-thumb-width);
    flex-shrink: 0;
}

.product-thumbs-v {
    height: 100%;
    margin: 0;
    /* Remove potential offsets */
}

.product-thumbs-v .swiper-slide {
    height: auto !important;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-thumbs-v .swiper-slide-thumb-active {
    opacity: 1;
}

.c-thumb-item {
    border: 1px solid rgba(125, 28, 28, 0.15);
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    height: var(--product-hero-thumb-width);
    border-radius: 8px;
}

.product-thumbs-v .swiper-slide-thumb-active .c-thumb-item {
    border-color: var(--clr-secondary);
    border-width: 2px;
    box-shadow: 0 8px 16px rgba(125, 28, 28, 0.12);
}

.c-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Changed to cover for professional look in thumbs */
}

.c-main-image-container {
    height: 100%;
    background-color: #fff;
    border: 1px solid rgba(125, 28, 28, 0.08) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.c-main-image-container .swiper-slide img {
    width: 100%;
    padding: 0;
    /* Removed padding to maximize use of space */
    transition: transform 0.5s ease;
}

/* Navigation Arrows */
.c-nav-arrow {
    width: 44px;
    height: 44px;
    background: white !important;
    border-radius: 50%;
    color: var(--clr-secondary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.2s ease;
}

.c-nav-arrow:hover {
    background: var(--clr-secondary) !important;
    color: white !important;
    transform: translateY(-50%) scale(1.1);
}

.c-nav-arrow::after {
    display: none;
}

/* Weight Buttons */
.c-weight-btn {
    border: 1px solid #7d1c1c33;
    background: #fdfaf5;
    color: #444;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.c-weight-btn:hover {
    background: #7d1c1c11;
}

.c-weight-btn.active {
    background: #7D1C1C;
    color: white;
    border-color: #7D1C1C;
}

/* Quantity Control */
.c-qty-control .btn {
    transition: all 0.2s;
}

.c-qty-control .btn:hover {
    background: var(--clr-secondary);
    color: white;
    border-color: var(--clr-secondary);
}

/* Action Buttons */
.c-btn-cart:hover {
    background: var(--clr-primary) !important;
    transform: translateY(-2px);
}

.c-btn-buy:hover {
    background: #fdfaf5 !important;
    border-color: var(--clr-primary) !important;
    color: var(--clr-primary) !important;
    transform: translateY(-2px);
}

/* Trust Feature Strip Styling */
.c-trust-strip {
    background-color: #fff;
}

.c-trust-icon-wrap {
    width: 24px;
    height: 24px;
    border: 1px solid #7b1d1d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b1d1d;
    font-size: 12px;
    flex-shrink: 0;
}

.c-trust-strip span {
    color: #444;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .c-trust-strip .col-6 {
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .c-trust-strip .col-6:nth-last-child(-n+2) {
        border-bottom: none;
        margin-bottom: 0;
    }
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    .c-main-image-container {
        height: 400px !important;
    }

    .p-cart-page .c-product-details {
        margin-top: 2rem;
    }

    .p-cart-page .c-product-details h1 {
        font-size: 32px !important;
    }
}

@media (max-width: 767.98px) {
    .c-cart-items-card {
        padding: 1.5rem !important;
    }

    .c-cart-item-mobile:last-child {
        border-bottom: none !important;
    }

    .c-order-summary {
        margin-top: 1rem;
    }

    .c-main-image-container {
        height: 300px !important;
    }
}

/* --- Product Information Section --- */
.c-product-info-section {
    background-color: transparent;
}

/* Feature Cards Grid styling */
.c-feature-card {
    background-color: #FDF8F2;
    transition: all 0.3s ease;
}

.c-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(125, 28, 28, 0.1) !important;
}

.c-feature-card__icon-wrap {
    width: 72px;
    height: 72px;
    border: 1px solid rgba(125, 28, 28, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8860b;
    font-size: 28px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Accordion Styling for Detailed Info */
.c-accordion-item {
    border: 1px solid rgba(125, 28, 28, 0.15);
    border-radius: 8px !important;
    background: #FDF8F2;
    /* Creamy color from mockup */
    overflow: hidden;
}

.c-accordion-header {
    background: #FDF8F2;
    transition: all 0.3s ease;
}

.c-accordion-header.collapsed {
    background: #FDF8F2;
}

.c-accordion-header:not(.collapsed) {
    background: #FDF8F2;
}

.c-accordion-icon {
    color: #D67A18;
    /* Detailed orange color for icon */
    font-size: 24px;
    transition: transform 0.3s ease;
}

.c-accordion-header:not(.collapsed) .c-accordion-icon {
    transform: rotate(45deg);
}

.c-accordion-body {
    background: #FDF8F2;
}

/* Feature Item Icons */
.c-feature-item-icon {
    transition: all 0.3s ease;
}

.c-feature-item-icon:hover {
    transform: scale(1.1);
    border-color: #7b1d1d !important;
}

/* Detailed Subscribe Box */
.c-detailed-subscribe-box {
    transition: all 0.3s ease;
}

.c-detailed-subscribe-box:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 45px rgba(123, 29, 29, 0.25) !important;
}

.c-detailed-subscribe-box .btn-light:hover {
    background: white !important;
    transform: translateY(-2px);
}

/* Subscribe Box Styling */
.c-subscribe-box {
    box-shadow: 0 15px 35px rgba(123, 29, 29, 0.15);
}

.c-subscribe-box .btn-light {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.c-subscribe-box .btn-light:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Adjust heading for info section */
.c-product-info-section h2 {
    letter-spacing: -0.02em;
}

@media (max-width: 991.98px) {
    .c-product-info-section .row>div:nth-child(2) h2 {
        display: none;
        /* Hide duplicate heading on mobile if stacked */
    }
}

/* --- Related Products Section --- */
.c-related-products {
    background-color: #fdfaf5;
}

.c-related-card {
    background: white;
    transition: all 0.3s ease;
}

.c-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(123, 29, 29, 0.1) !important;
}

.c-related-card__img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 10px;
}

.c-related-card__img-wrap img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.c-related-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.c-related-badge--discount {
    background: #2e9d14;
    /* Green matching the image */
}

.c-related-badge--bestseller {
    background: #f89e1b;
    /* Orange matching the image */
}

.c-related-card__btn {
    background: #8b1c1c;
    /* Maroon matching site theme */
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.c-related-card__btn:hover {
    background: #7b1d1d;
    color: white;
    transform: scale(1.02);
}