
/* ===== CART PAGE STYLES ===== */

/* Cart Header */
.cart-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('https://images.unsplash.com/photo-1607083206968-13611e3d76db?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    padding: clamp(60px, 8vw, 80px) 0;
    text-align: center;
    color: white;
    margin-bottom: clamp(40px, 6vw, 60px);
}

.cart-header h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: #D4AF37;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.breadcrumb span {
    color: white;
    font-weight: 500;
}

/* Cart Section */
.cart-section {
    padding-bottom: clamp(60px, 8vw, 100px);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: clamp(30px, 4vw, 40px);
}

/* Cart Items */
.cart-items {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
}

.cart-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 2px solid rgba(212, 175, 55, 0.1);
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: #1a1a1a;
}

.cart-items-list {
    padding: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
    gap: 20px;
    padding: 25px 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    align-items: center;
    transition: background 0.3s ease;
}

.cart-item:hover {
    background: rgba(212, 175, 55, 0.03);
}

.cart-item-product {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

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

.cart-item:hover .cart-item-image img {
    transform: scale(1.05);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.cart-item-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item-name a:hover {
    color: #D4AF37;
}

.cart-item-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.cart-item-meta span {
    background: rgba(212, 175, 55, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
}

.cart-item-price,
.cart-item-total {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #D4AF37;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 140px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-btn:disabled:hover {
    background: #f8f9fa;
    color: #666;
    border-color: #ddd;
}

.quantity-selector input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.quantity-selector input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.cart-item-actions .remove-item-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.cart-item-actions .remove-item-btn:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

/* Cart Actions */
.cart-actions {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.cart-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Cinzel', serif;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid;
}

.btn-outline {
    background: transparent;
    color: #666;
    border-color: #ddd;
}

.btn-outline:hover {
    background: #f8f9fa;
    color: #1a1a1a;
    border-color: #666;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #D4AF37, #B8860B);
    color: white;
    border-color: #D4AF37;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #B8860B, #996515);
    border-color: #B8860B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 30px;
    margin-bottom: 25px;
}

.summary-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: #1a1a1a;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #666;
}

.summary-row span:last-child {
    font-weight: 500;
    color: #1a1a1a;
}

.free-shipping {
    color: #28a745;
    font-weight: 600;
}

.discount-row {
    margin: 25px 0;
    padding: 25px 0;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.discount-input {
    display: flex;
    gap: 10px;
    width: 100%;
}

.discount-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.discount-input input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.discount-input .btn {
    padding: 12px 20px;
    white-space: nowrap;
}

.total-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
}

.summary-actions {
    margin-top: 30px;
}

.btn-checkout {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.payment-methods {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.payment-methods p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95rem;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.8rem;
    color: #666;
}

.payment-icons i:hover {
    color: #D4AF37;
    cursor: pointer;
}

/* Security Info */
.security-info {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 25px;
}

.security-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.security-item:last-child {
    margin-bottom: 0;
}

.security-item i {
    font-size: 1.5rem;
    color: #D4AF37;
    margin-top: 5px;
}

.security-item h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin: 0 0 5px 0;
    color: #1a1a1a;
}

.security-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.empty-cart-icon {
    width: 120px;
    height: 120px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.empty-cart-icon i {
    font-size: 4rem;
    color: #D4AF37;
}

.empty-cart h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.empty-cart p {
    font-size: 1.1rem;
    color: #666;
    max-width: 400px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.empty-cart .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Recently Viewed */
.recently-viewed {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.recently-viewed h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #1a1a1a;
    text-align: center;
}

.recently-viewed .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.recently-viewed .product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
    text-decoration: none;
    color: inherit;
}

.recently-viewed .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(212, 175, 55, 0.3);
}

.recently-viewed .product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.recently-viewed .product-info {
    padding: 20px;
}

.recently-viewed .product-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    line-height: 1.4;
}

.recently-viewed .product-price {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 15px;
}

.recently-viewed .product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.recently-viewed .add-to-cart {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #D4AF37, #B8860B);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.recently-viewed .add-to-cart:hover {
    background: linear-gradient(135deg, #B8860B, #996515);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media (min-width: 1440px) {
    .cart-layout {
        grid-template-columns: 1fr 400px;
    }
    
    .summary-card {
        padding: 35px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .cart-layout {
        grid-template-columns: 1fr 320px;
    }
    
    .cart-table-header {
        grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
        font-size: 0.9rem;
    }
    
    .cart-item {
        grid-template-columns: 2fr 1fr 1fr 1fr 0.5fr;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-table-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
        position: relative;
    }
    
    .cart-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 20px;
        right: 20px;
        height: 1px;
        background: rgba(212, 175, 55, 0.1);
    }
    
    .cart-item-product {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
        gap: 15px;
    }
    
    .cart-item-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
    
    .cart-item-details {
        text-align: center;
        width: 100%;
    }
    
    .cart-item-price,
    .cart-item-quantity,
    .cart-item-total,
    .cart-item-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-top: 1px dashed rgba(212, 175, 55, 0.1);
    }
    
    .cart-item-price::before {
        content: 'Price: ';
        font-weight: 500;
        color: #666;
    }
    
    .cart-item-total::before {
        content: 'Total: ';
        font-weight: 500;
        color: #666;
    }
    
    .cart-item-quantity::before {
        content: 'Quantity: ';
        font-weight: 500;
        color: #666;
    }
    
    .cart-item-actions::before {
        content: 'Remove: ';
        font-weight: 500;
        color: #666;
    }
    
    .cart-item-actions {
        justify-content: center;
    }
    
    .quantity-selector {
        width: auto;
    }
    
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cart-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .recently-viewed .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .cart-header {
        padding: 40px 20px;
    }
    
    .cart-header h1 {
        font-size: 1.8rem;
    }
    
    .cart-item-image {
        width: 120px;
        height: 120px;
    }
    
    .cart-item-name {
        font-size: 1.1rem;
    }
    
    .cart-item-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .cart-item-price,
    .cart-item-total {
        font-size: 1.1rem;
    }
    
    .summary-card {
        padding: 25px;
    }
    
    .empty-cart {
        padding: 60px 20px;
    }
    
    .empty-cart-icon {
        width: 100px;
        height: 100px;
    }
    
    .empty-cart-icon i {
        font-size: 3rem;
    }
    
    .empty-cart h2 {
        font-size: 1.8rem;
    }
    
    .recently-viewed {
        margin-top: 40px;
        padding-top: 40px;
    }
    
    .recently-viewed h3 {
        font-size: 1.5rem;
    }
    
    .recently-viewed .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile Portrait */
@media (max-width: 576px) {
    .cart-item {
        padding: 15px;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
    
    .quantity-selector {
        width: 130px;
    }
    
    .quantity-selector input {
        width: 50px;
    }
    
    .cart-actions {
        padding: 20px 15px;
    }
    
    .cart-actions .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .summary-card h3 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .summary-row {
        font-size: 0.95rem;
    }
    
    .discount-input {
        flex-direction: column;
    }
    
    .discount-input .btn {
        width: 100%;
    }
    
    .btn-checkout {
        padding: 14px;
        font-size: 1rem;
    }
    
    .security-info {
        padding: 20px;
    }
    
    .security-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 10px;
    }
    
    .empty-cart {
        padding: 40px 20px;
    }
    
    .empty-cart-icon {
        width: 80px;
        height: 80px;
    }
    
    .empty-cart-icon i {
        font-size: 2.5rem;
    }
    
    .empty-cart h2 {
        font-size: 1.5rem;
    }
    
    .empty-cart p {
        font-size: 1rem;
    }
    
    .empty-cart .btn {
        padding: 14px 30px;
        font-size: 1rem;
    }
    
    .recently-viewed .products-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .cart-header {
        padding: 30px 15px;
    }
    
    .cart-header h1 {
        font-size: 1.6rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .cart-item-price::before,
    .cart-item-total::before,
    .cart-item-quantity::before,
    .cart-item-actions::before {
        font-size: 0.9rem;
    }
    
    .payment-icons {
        font-size: 1.5rem;
        gap: 12px;
    }
    
    .recently-viewed {
        margin-top: 30px;
        padding-top: 30px;
    }
    
    .recently-viewed h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .cart-item:hover {
        background: transparent;
    }
    
    .cart-item:hover .cart-item-image img {
        transform: none;
    }
    
    .quantity-btn:active,
    .remove-item-btn:active,
    .btn:active,
    .add-to-cart:active {
        transform: scale(0.95);
    }
    
    .btn-checkout:active {
        transform: scale(0.98);
    }
}