/* Rohini Threads - Cart & Wishlist Page Styles */

/* ============================================
   Cart Page Layout
   ============================================ */
.cart-page,
.wishlist-page {
    padding-top: 130px;
    min-height: 100vh;
    background: var(--light-color);
}

.cart-container,
.wishlist-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-title {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 30px;
}

/* ============================================
   Cart Layout
   ============================================ */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

/* ============================================
   Cart Items
   ============================================ */
.cart-items {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 20px;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-name {
    text-decoration: none;
    color: inherit;
}

.cart-item-name h4 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.cart-item-name:hover h4 {
    color: var(--primary-color);
}

.cart-item-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.cart-item-variants .variant {
    font-size: 0.85rem;
    color: #666;
    background: var(--light-color);
    padding: 3px 10px;
    border-radius: 4px;
}

.cart-item-price {
    font-size: 1rem;
    color: #555;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.cart-item-quantity .qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.cart-item-quantity .qty-btn:hover {
    background: #e0e0e0;
}

.cart-item-quantity .qty-input {
    width: 50px;
    height: 36px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 1rem;
}

.cart-item-quantity .qty-input:focus {
    outline: none;
}

.cart-item-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 100px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: var(--accent-color);
}

/* ============================================
   Cart Summary
   ============================================ */
.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

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

.summary-savings {
    color: #25D366;
}

.shipping-note {
    color: #999;
    font-size: 0.85rem;
}

.summary-divider {
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

.summary-total {
    font-size: 1.2rem;
    font-weight: 700;
}

.summary-total span:last-child {
    color: var(--primary-color);
}

.checkout-btn {
    margin-top: 20px;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
}

.continue-shopping:hover {
    text-decoration: underline;
}

/* ============================================
   Empty Cart
   ============================================ */
.empty-cart {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-cart-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.empty-cart p {
    color: #666;
    margin-bottom: 25px;
}

/* ============================================
   Wishlist Grid
   ============================================ */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.wishlist-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.wishlist-item:hover {
    transform: translateY(-5px);
}

.wishlist-item-image {
    position: relative;
    height: 250px;
}

.wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #999;
    transition: all 0.2s;
}

.wishlist-remove-btn:hover {
    color: var(--accent-color);
    background: #fff5f5;
}

.wishlist-item-details {
    padding: 20px;
}

.wishlist-item-details a {
    text-decoration: none;
    color: inherit;
}

.wishlist-item-details h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.wishlist-item-details a:hover h4 {
    color: var(--primary-color);
}

.wishlist-item-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.wishlist-item-price .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.wishlist-item-price .original-price {
    font-size: 0.95rem;
    color: #999;
    text-decoration: line-through;
}

.wishlist-item-stock {
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.wishlist-item-actions {
    display: flex;
    gap: 10px;
}

.wishlist-item-actions .btn {
    flex: 1;
}

/* Empty Wishlist */
.empty-wishlist {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-wishlist-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-wishlist h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.empty-wishlist p {
    color: #666;
    margin-bottom: 25px;
}

/* Wishlist Actions Bar */
.wishlist-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 15px;
}

.wishlist-count {
    color: #666;
}

.wishlist-bulk-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   Mini Cart (Header Dropdown)
   ============================================ */
.mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.nav-icon:hover .mini-cart-dropdown,
.mini-cart-dropdown:hover {
    opacity: 1;
    visibility: visible;
}

.mini-cart-items {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.mini-cart-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.mini-cart-item:last-child {
    border-bottom: none;
}

.mini-cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.mini-cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-cart-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
}

.mini-cart-item-price {
    font-size: 0.85rem;
    color: #666;
}

.mini-cart-more {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    padding: 10px 0;
}

.mini-cart-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 15px;
}

.mini-cart-empty {
    padding: 30px 20px;
    text-align: center;
}

.mini-cart-empty p {
    color: #666;
    margin-bottom: 15px;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.6rem;
    }

    .cart-item {
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
    }

    .cart-item-image {
        width: 100px;
        height: 100px;
        grid-row: span 2;
    }

    .cart-item-details {
        grid-column: 2;
    }

    .cart-item-quantity {
        grid-column: 2;
    }

    .cart-item-total {
        grid-column: 1 / -1;
        text-align: left;
        padding-top: 10px;
        border-top: 1px dashed #eee;
        margin-top: 10px;
    }

    .cart-item-remove {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .cart-item {
        position: relative;
    }

    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .wishlist-item-image {
        height: 180px;
    }

    .wishlist-actions-bar {
        flex-direction: column;
        text-align: center;
    }

    .wishlist-bulk-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .wishlist-grid {
        grid-template-columns: 1fr;
    }

    .wishlist-item-image {
        height: 220px;
    }

    .wishlist-item-actions {
        flex-direction: column;
    }
}
