/* ===================================
   CART PAGE STYLES - Minimal & Clean
   =================================== */

/* ===================================
   CART PAGE LAYOUT
   =================================== */

.cart-page {
    min-height: calc(100vh - 80px - 200px);
    padding: 8rem 0 6rem;
    background: var(--bg);
}

.cart-page .container {
    max-width: 1200px;
}

/* ===================================
   CART HEADER
   =================================== */

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.cart-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.continue-shopping {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    border: 2px solid transparent;
}

.continue-shopping:hover {
    border-color: var(--primary);
    background: var(--bg-light);
    transform: translateX(-4px);
}

/* ===================================
   CART CONTENT LAYOUT
   =================================== */

.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
}

/* ===================================
   EMPTY CART STATE
   =================================== */

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 2px dashed var(--border-muted);
}

.empty-cart-icon {
    margin-bottom: 2rem;
    opacity: 0.25;
}

.empty-cart-icon svg {
    stroke: var(--text);
}

.empty-cart h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.empty-cart p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 400px;
}

/* ===================================
   CART ITEMS TABLE
   =================================== */

.cart-items-section {
    min-height: 400px;
}

.cart-items-table {
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-muted);
}

body.light-mode .cart-items-table {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cart-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 50px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg);
    font-weight: 600;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-muted);
}

.cart-table-body {
    padding: 0.5rem;
}

/* ===================================
   CART ITEM ROW
   =================================== */

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 50px;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

/* Product Column */
.item-product {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.item-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.item-details h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.item-details h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-details h3 a:hover {
    color: var(--accent-primary);
}

.item-variant {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Price, Quantity, Total Columns */
.item-price,
.item-total {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Quantity Controls */
.item-quantity {
    display: flex;
    justify-content: flex-start;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

body.light-mode .quantity-controls {
    background: #fff;
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    appearance: textfield;
    -moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
    background: rgba(139, 69, 19, 0.05);
    border-radius: 4px;
}

/* Remove Button */
.item-remove {
    display: flex;
    justify-content: center;
}

.remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
    transform: scale(1.1);
}

.remove-btn:active {
    transform: scale(0.95);
}

/* ===================================
   CART SUMMARY
   =================================== */

.cart-summary {
    position: sticky;
    top: 100px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.summary-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.summary-amount {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

.summary-note {
    font-size: 0.875rem;
    font-style: italic;
    font-weight: 400;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

.summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem 0;
    margin-top: 0.5rem;
    color: var(--text-primary);
}

.summary-total-amount {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

/* Summary Note Box */
.summary-note-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin: 1.5rem 0;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

body.light-mode .summary-note-box {
    background: rgba(139, 69, 19, 0.08);
}

.summary-note-box svg {
    flex-shrink: 0;
    stroke: var(--accent-primary);
    margin-top: 2px;
}

.summary-note-box p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.trust-item svg {
    flex-shrink: 0;
    stroke: var(--accent-primary);
}

/* ===================================
   PROMOTIONAL BANNER
   =================================== */

.promo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.15), rgba(139, 69, 19, 0.05));
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 12px;
    text-align: center;
}

body.light-mode .promo-banner {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(139, 69, 19, 0.03));
}

.promo-banner svg {
    flex-shrink: 0;
    stroke: var(--accent-primary);
}

.promo-banner p {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.promo-banner strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 2rem 0;
    }

    .cart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .cart-title {
        font-size: 2rem;
    }

    .continue-shopping {
        padding: 0.5rem 0;
    }

    .cart-table-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }

    .item-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .item-product img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .item-details {
        width: 100%;
    }

    .item-price,
    .item-quantity,
    .item-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0.5rem 0;
    }

    .item-price::before {
        content: 'Price:';
        font-weight: 400;
        color: var(--text-tertiary);
    }

    .item-quantity::before {
        content: 'Quantity:';
        font-weight: 400;
        color: var(--text-tertiary);
    }

    .item-total::before {
        content: 'Total:';
        font-weight: 400;
        color: var(--text-tertiary);
    }

    .item-remove {
        justify-content: flex-end;
    }

    .remove-btn {
        width: 100%;
        justify-content: center;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .summary-title {
        font-size: 1.25rem;
    }

    .promo-banner {
        flex-direction: column;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .cart-title {
        font-size: 1.75rem;
    }

    .cart-item {
        padding: 1rem;
    }

    .item-product img {
        max-height: 150px;
    }

    .summary-total {
        font-size: 1.125rem;
    }

    .summary-total-amount {
        font-size: 1.25rem;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item {
    animation: slideIn 0.3s ease forwards;
}

.cart-item:nth-child(1) { animation-delay: 0.05s; }
.cart-item:nth-child(2) { animation-delay: 0.1s; }
.cart-item:nth-child(3) { animation-delay: 0.15s; }
.cart-item:nth-child(4) { animation-delay: 0.2s; }
.cart-item:nth-child(5) { animation-delay: 0.25s; }

/* ===================================
   ACCESSIBILITY
   =================================== */

.cart-item:focus-within {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.qty-btn:focus,
.remove-btn:focus,
.qty-input:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    .cart-item {
        border: 1px solid var(--border-color);
    }

    .quantity-controls {
        border: 2px solid var(--border-color);
    }
}

/* ===================================
   SECRET GIFT STYLES
   =================================== */

.cart-item-gift {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.08), 
        rgba(255, 193, 7, 0.05),
        rgba(139, 69, 19, 0.06)
    );
    border: 2px solid rgba(255, 193, 7, 0.3);
    position: relative;
    overflow: hidden;
    animation: giftShimmer 3s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.15);
}

.cart-item-gift::before {
    content: '🎁';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2.5rem;
    opacity: 0.15;
    animation: giftBounce 2s ease-in-out infinite;
}

.cart-item-gift::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: giftShine 3s ease-in-out infinite;
}

body.light-mode .cart-item-gift {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.15), 
        rgba(255, 193, 7, 0.1),
        rgba(139, 69, 19, 0.08)
    );
    border-color: rgba(255, 193, 7, 0.4);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.cart-item-gift:hover {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.12), 
        rgba(255, 193, 7, 0.08),
        rgba(139, 69, 19, 0.08)
    );
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.25);
    transform: translateY(-2px);
}

body.light-mode .cart-item-gift:hover {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.2), 
        rgba(255, 193, 7, 0.15),
        rgba(139, 69, 19, 0.1)
    );
}

.cart-item-gift .item-details h3 {
    color: #d4a574;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-mode .cart-item-gift .item-details h3 {
    color: #c49150;
}

.cart-item-gift-note {
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-style: italic;
    margin: 0.25rem 0 0 0;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(139, 69, 19, 0.8), rgba(255, 193, 7, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-item-gift .item-price {
    color: #ffc107;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.light-mode .cart-item-gift .item-price {
    color: #f59e0b;
}

.cart-item-gift .item-total {
    color: #ffc107;
    font-weight: 700;
    font-size: 1.1rem;
}

body.light-mode .cart-item-gift .item-total {
    color: #f59e0b;
}

.cart-item-gift .qty-input {
    background: rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
    opacity: 0.6;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

body.light-mode .cart-item-gift .qty-input {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 193, 7, 0.4);
}

.gift-lock {
    font-size: 1.5rem;
    opacity: 0.5;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
}

.gift-lock:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Gift Animations */
@keyframes giftShimmer {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3);
    }
}

@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.1);
    }
}

@keyframes giftShine {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

/* ===================================
   GIFT NOTIFICATION TOAST
   =================================== */

.gift-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.95), 
        rgba(255, 193, 7, 0.95)
    );
    color: #3e2723;
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(255, 193, 7, 0.4);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 350px;
    border: 2px solid rgba(139, 69, 19, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gift-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gift-toast-icon {
    font-size: 2rem;
    animation: giftToastBounce 0.6s ease-in-out;
}

.gift-toast-content {
    flex: 1;
}

.gift-toast-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 0.25rem 0;
    color: #5d4037;
}

.gift-toast-message {
    font-size: 0.9rem;
    margin: 0;
    color: #6d4c41;
    font-weight: 500;
}

body.light-mode .gift-toast {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.98), 
        rgba(255, 193, 7, 0.98)
    );
    box-shadow: 0 10px 40px rgba(255, 193, 7, 0.5);
}

@keyframes giftToastBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2) rotate(-10deg);
    }
    50% {
        transform: scale(0.9) rotate(10deg);
    }
    75% {
        transform: scale(1.1) rotate(-5deg);
    }
}

/* Mobile Responsive for Gift Toast */
@media (max-width: 768px) {
    .gift-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        padding: 1rem 1.25rem;
    }
    
    .gift-toast-icon {
        font-size: 1.75rem;
    }
    
    .gift-toast-title {
        font-size: 0.95rem;
    }
    
    .gift-toast-message {
        font-size: 0.85rem;
    }
}
