/* ==============================================
   CART PAGE - TWO-COLUMN LAYOUT
   Romantic Rose Theme
============================================== */

/* ================ PAGE LAYOUT ================ */
.cart-page {
    min-height: 100vh;
    background: #fafaf9;
    padding-top: 100px;
    padding-bottom: 4rem;
}

.cart-page > .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ================ TWO-COLUMN LAYOUT ================ */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 3rem;
    align-items: start;
}

/* ================ LEFT COLUMN - INFO ================ */
.cart-info-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 560px;
}

.cart-info-section {
    padding: 1.75rem 0;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--stone-100);
}

.section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon-purple {
    background: #f3e8ff;
    color: #9333ea;
}

.section-icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.section-icon-rose {
    background: var(--rose-100);
    color: var(--rose-600);
}

.section-header h2 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--stone-800);
    margin: 0;
}

/* Steps List */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--stone-100);
    color: var(--stone-600);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-item p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--stone-700);
    line-height: 1.5;
    margin: 0;
}

.step-item p u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.trust-icon {
    width: 24px;
    height: 24px;
    color: var(--stone-400);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-item p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--stone-700);
    line-height: 1.4;
    margin: 0;
}

.trust-item strong {
    font-weight: 700;
    color: var(--stone-800);
}

/* Testimonial */
.testimonial-card {
    background: var(--stone-50);
    border-radius: 12px;
    padding: 1.25rem;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--stone-200);
    flex-shrink: 0;
}

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

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--stone-600);
    background: var(--stone-200);
}

.testimonial-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stone-800);
}

.testimonial-stars {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.testimonial-quote {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--stone-600);
    line-height: 1.5;
    margin: 0;
}

/* What you receive */
.receive-intro {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--stone-700);
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
}

.receive-intro strong {
    font-weight: 700;
    color: var(--stone-800);
}

.receive-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.receive-item {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.receive-icon {
    width: 24px;
    height: 24px;
    color: var(--stone-400);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.receive-item div {
    flex: 1;
}

.receive-item strong {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stone-800);
    display: block;
    margin-bottom: 0.125rem;
}

.receive-item p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--stone-500);
    line-height: 1.4;
    margin: 0;
}

/* ================ RIGHT COLUMN - CART SUMMARY ================ */
.cart-summary-column {
    position: sticky;
    top: 120px;
}

.cart-summary-card {
    padding: 1.75rem 0;
}

.cart-summary-card h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--stone-800);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

/* Cart Items */
.cart-items {
    border-bottom: 1px solid var(--stone-100);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.cart-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.75rem 0;
}

.cart-summary-item:first-child {
    padding-top: 0;
}

.cart-item-play {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--stone-100);
    color: var(--stone-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--stone-300);
    flex-shrink: 0;
    margin-top: 6px;
    margin-left: 18px;
}

.cart-item-bullet.discount {
    background: #10b981;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-details strong {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stone-800);
    display: block;
}

.cart-item-details p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--stone-500);
    margin: 0.125rem 0 0 0;
    line-height: 1.4;
}

.cart-item-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.item-action {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--stone-500);
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.item-action:hover {
    color: var(--stone-700);
}

.cart-item-price {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stone-800);
    flex-shrink: 0;
}

.cart-item-price.discount {
    color: #059669;
}

.cart-summary-item-small {
    padding: 0.5rem 0;
}

.cart-summary-item-small .cart-item-details strong {
    font-size: 0.9rem;
    font-weight: 500;
}

.cart-summary-item-small .cart-item-price {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Forgot add-ons link */
.forgot-addons-link {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--stone-500);
    text-decoration: underline;
    display: block;
    margin-bottom: 1rem;
}

.forgot-addons-link:hover {
    color: var(--stone-700);
}

/* Coupon Section */
.coupon-section {
    margin-bottom: 1rem;
}

.coupon-input-group {
    display: flex;
    gap: 0.5rem;
}

.coupon-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--stone-200);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    background: white;
    color: var(--stone-800);
    transition: border-color 0.2s ease;
}

.coupon-input-group input::placeholder {
    color: var(--stone-400);
}

.coupon-input-group input:focus {
    outline: none;
    border-color: var(--stone-400);
}

.btn-apply-coupon {
    background: white;
    color: var(--stone-700);
    border: 1px solid var(--stone-200);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-apply-coupon:hover:not(:disabled) {
    background: var(--stone-50);
    border-color: var(--stone-300);
}

.btn-apply-coupon:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.coupon-info {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #047857;
}

.btn-remove-coupon {
    background: transparent;
    color: #047857;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.btn-remove-coupon:hover {
    color: #065f46;
}

.coupon-message {
    margin-top: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
}

/* Totals */
.cart-totals {
    padding: 1rem 0;
    border-top: 1px solid var(--stone-100);
    margin-bottom: 1rem;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-subtotal span {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--stone-500);
}

.cart-total {
    display: flex;
    justify-content: space-between;
}

.cart-total span {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--stone-800);
}

/* Payment Form */
.payment-form {
    opacity: 0;
    transition: opacity 0.4s ease;
}

#payment-element {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--stone-200);
    border-radius: 12px;
    background: white;
}

.card-errors {
    font-family: 'DM Sans', sans-serif;
    color: var(--rose-600);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    min-height: 1rem;
}

.terms-agree {
    margin: 1rem 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--stone-600);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.terms-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rose-500);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
}

.terms-agree label {
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
}

.terms-agree a {
    color: var(--rose-500);
    text-decoration: underline;
}

.terms-agree a:hover {
    color: var(--rose-700);
}

/* Payment Button */
.payment-btn {
    width: 100%;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.payment-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}

.payment-btn:disabled {
    background: var(--stone-200);
    color: var(--stone-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Payment Security */
.payment-security {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--stone-100);
    margin-top: 1rem;
}

.payment-security p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--stone-400);
    margin: 0 0 0.75rem 0;
}

.payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.payment-icons img {
    height: 24px;
    width: auto;
    opacity: 0.7;
}

.payment-icon-fallback {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    color: var(--stone-400);
    padding: 0.25rem 0.5rem;
    background: var(--stone-100);
    border-radius: 4px;
}

/* Cart Actions */
.cart-actions {
    text-align: center;
    margin-top: 1rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--stone-500);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.btn-back:hover {
    color: var(--stone-700);
}

/* ================ EMPTY CART STATE ================ */
.cart-empty {
    max-width: 500px;
    margin: 4rem auto;
    text-align: center;
    background: white;
    border: 1px solid var(--stone-100);
    border-radius: 20px;
    padding: 3rem 2rem;
}

.cart-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--rose-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--rose-400);
}

.cart-empty h2 {
    font-family: 'Playfair Display', Georgia, serif;
    margin: 0 0 0.75rem 0;
    font-weight: 700;
    color: var(--stone-800);
    font-size: 1.5rem;
}

.cart-empty p {
    font-family: 'DM Sans', sans-serif;
    color: var(--stone-500);
    margin: 0 0 1.75rem 0;
    font-size: 1rem;
}

.cart-empty .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
    transition: all 0.3s ease;
}

.cart-empty .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}

/* ================ MOBILE CART TITLE ================ */
.mobile-cart-title {
    display: none;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--stone-800);
    text-align: center;
    margin: 0 0 1.5rem 0;
}

/* ================ ORDER ITEMS LABEL ================ */
.order-items-label {
    display: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--stone-800);
    margin: 1rem 0 0.75rem 0;
}

/* ================ ACCORDION STYLES ================ */
.accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.accordion-chevron {
    display: none;
    margin-left: auto;
    color: var(--stone-400);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.cart-accordion.accordion-open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    /* Open by default on desktop */
}

/* ================ DESKTOP TESTIMONIAL ================ */
.cart-testimonial-desktop {
    padding: 1rem 0;
}

.cart-testimonial-desktop .testimonial-card {
    display: block;
    box-shadow: none;
}

/* ================ MOBILE TESTIMONIAL ================ */
.mobile-testimonial {
    display: none;
    background: var(--rose-50);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.mobile-testimonial .testimonial-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mobile-testimonial .testimonial-stars {
    margin-left: auto;
}

/* ================ RESPONSIVE DESIGN ================ */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cart-summary-column {
        position: static;
        order: 2;
    }

    .cart-info-column {
        order: 1;
        max-width: 100%;
        gap: 0;
    }

    /* Show mobile cart title */
    .mobile-cart-title {
        display: block;
    }

    /* Hide desktop cart title */
    .desktop-cart-title {
        display: none;
    }

    /* Show order items label */
    .order-items-label {
        display: block;
    }

    /* Accordion behavior on mobile */
    .accordion-chevron {
        display: block;
    }

    .section-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .cart-info-section {
        padding: 0;
        border-bottom: 1px solid var(--stone-200);
    }

    .accordion-trigger {
        padding: 1rem 0;
    }

    .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
    }

    .cart-accordion.accordion-open .accordion-content {
        max-height: 1000px;
        padding-bottom: 1rem;
    }

    /* Show mobile testimonial */
    .mobile-testimonial {
        display: block;
    }

    /* Hide desktop testimonial on mobile */
    .cart-testimonial-desktop {
        display: none;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding-top: 70px;
        padding-bottom: 2rem;
    }

    .cart-page > .container {
        padding: 0 1rem;
    }

    .mobile-cart-title {
        margin-bottom: 1rem;
    }

    .cart-summary-card {
        padding: 0;
    }

    .section-header h2 {
        font-size: 1rem;
        flex: 1;
    }

    .step-item p,
    .trust-item p,
    .receive-intro,
    .receive-item strong {
        font-size: 0.9rem;
    }

    .mobile-testimonial {
        padding: 1rem;
    }

    .testimonial-quote {
        font-size: 0.85rem;
    }

    .cart-item-details strong {
        font-size: 0.9rem;
    }

    .cart-item-details p {
        font-size: 0.8rem;
    }

    .payment-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Hide back button on mobile */
    .cart-actions {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-icon {
        width: 28px;
        height: 28px;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .cart-item-play {
        width: 40px;
        height: 40px;
    }

    .payment-icons {
        gap: 0.375rem;
    }

    .payment-icons img {
        height: 20px;
    }
}

/* ================ REDUCED MOTION ================ */
@media (prefers-reduced-motion: reduce) {
    .payment-form {
        transition: none;
    }

    .payment-btn,
    .btn-back,
    .btn-apply-coupon,
    .cart-empty .btn-primary {
        transition: none;
    }

    .spinner {
        animation: none;
    }
}
