/* assets/css/cart.css */

/* 1. GLOBAL RESET */
body.cart-page {
    background-color: #fff !important;
    color: #1d1d1d;
    font-family: 'Inter', sans-serif;
}

.cart-header {
    margin-bottom: 60px;
    text-align: center;
}

.cart-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #000;
    letter-spacing: -1px;
}

.cart-header p {
    color: #666;
    font-size: 14px;
}

/* 2. TABLE STYLES (Clean Look) */
.cart-table-container {
    overflow-x: auto;
    margin-bottom: 40px;
}

.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px; /* Space between rows */
    min-width: 700px;
}

.cart-table th {
    text-align: left;
    padding: 10px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    color: #999;
    font-weight: 700;
    border-bottom: 1px solid #eee;
}

.cart-table td {
    padding: 15px;
    vertical-align: middle;
    background: #fff;
    border-bottom: 1px solid #f9f9f9;
}

/* Product Column */
.cart-product {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 5px;
}

.cart-details h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 5px;
    font-family: 'Inter', sans-serif;
    color: #000;
}

.cart-details span {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quantity Buttons */
.qty-box {
    display: flex;
    align-items: center;
    border: 1px solid #e1e1e1;
    border-radius: 30px;
    width: fit-content;
    padding: 2px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    color: #000;
    border-radius: 50%;
    transition: 0.2s;
}

.qty-btn:hover { background: #f0f0f0; }

.qty-input {
    width: 30px;
    text-align: center;
    border: none;
    font-weight: 600;
    font-size: 13px;
    color: #000;
    background: transparent;
}

.btn-remove {
    color: #ff4d4d;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
    opacity: 0.5;
}
.btn-remove:hover { opacity: 1; transform: scale(1.1); }

/* 3. SUMMARY BOX (The Right Column) */
.cart-summary {
    background: #fcfcfc; /* Very light grey */
    padding: 40px;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    margin-bottom: 30px;
    color: #000;
    font-weight: 500;
}

/* Clean Form Inputs */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ddd; /* Only bottom border for clean look */
    background: transparent;
    font-size: 14px;
    color: #000;
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-bottom-color: #000;
}

.form-control::placeholder { color: #ccc; }

/* Totals Section Fix */
.summary-row {
    display: flex;
    justify-content: space-between; /* Pushes text to edges */
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
    width: 100%;
}

.summary-row .label {
    text-align: left;
}

.summary-row .value {
    text-align: right;
    font-weight: 600;
    color: #000;
}

/* Grand Total Style */
.summary-row.total {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #000; /* Dark line above total */
    font-size: 18px;
    color: #000;
    font-weight: 700;
}

/* THE ACTION BUTTON (Fixed Style) */
.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #000;
    color: #fff !important;
    padding: 18px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    margin-top: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    background: var(--main-color); /* Use your theme color or #333 */
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-checkout i { font-size: 16px; }

/* Empty State */
.empty-cart { text-align: center; padding: 80px 0; }
.empty-cart i { font-size: 50px; color: #eee; margin-bottom: 20px; display:block; }
.btn-back { display: inline-block; padding: 12px 40px; background: #000; color: #fff; border-radius: 30px; text-decoration: none; font-size: 12px; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }



.btn-whatsapp-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #25D366; /* WhatsApp Green */
    color: #fff !important;
    padding: 15px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-whatsapp-cart:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.divider-text {
    text-align: center;
    margin: 15px 0;
    font-size: 11px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* =========================================
   5. EDIT MODAL FIXES
   ========================================= */

/* 1. Make Modal Wider for Optical Grid */
.edit-modal {
    max-width: 750px !important; /* Increased from 600px */
    width: 95% !important;
}

/* 2. Fix Optical Grid Inputs (Glass Lenses) */
#edit-form-glass .optical-grid {
    display: flex;
    flex-direction: column;
    gap: 0; /* Remove gap to look like a table */
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    overflow: hidden;
}

#edit-form-glass .optical-row {
    display: flex;
    width: 100%;
    border-bottom: 1px solid #eee;
}

#edit-form-glass .optical-row:last-child {
    border-bottom: none;
}

#edit-form-glass .optical-cell {
    flex: 1; /* Distribute space equally */
    padding: 10px;
    border-right: 1px solid #eee;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px; /* Prevent shrinking */
}

#edit-form-glass .optical-cell:last-child {
    border-right: none;
}

#edit-form-glass .optical-header .optical-cell {
    background: #f9f9f9;
    font-weight: 700;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The Input Field Itself */
#edit-form-glass .optical-input {
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 5px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    border-radius: 4px;
    height: 40px; /* Enforce height */
}

#edit-form-glass .eye-label {
    font-weight: 900;
    background: #000 !important;
    color: #fff;
    font-size: 14px;
}

/* 3. Fix Cancel Button Style */
.btn-cancel-edit {
    flex: 1;
    padding: 16px; /* Match Save button height */
    background-color: #fff;
    border: 1px solid #000;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel-edit:hover {
    background-color: #f5f5f5;
    border-color: #333;
}
/* Responsive */
@media (max-width: 991px) {
    .cart-summary { margin-top: 40px; padding: 30px 20px; }
    .cart-header h1 { font-size: 36px; }
}