/* ===================== FAT Lighting — Ordering System ===================== */
/* Reuses the site's existing gold (#D4AF37) / dark theme and Bootstrap 4 grid. */

.btn-cart-primary {
    display: inline-block;
    background: #D4AF37;
    color: #000;
    padding: 12px 26px;
    font-weight: bold;
    text-decoration: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: 0.3s;
}
.btn-cart-primary:hover { background: #b9952c; color: #000; text-decoration: none; }
.btn-cart-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-cart-secondary {
    display: inline-block;
    background: transparent;
    border: 2px solid #D4AF37;
    color: #000;
    padding: 10px 24px;
    font-weight: bold;
    border-radius: 3px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}
.btn-cart-secondary:hover { background: #D4AF37; color: #000; text-decoration: none; }

.cart-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
}
.mobile-nav-actions {
    gap: 10px;
}
.mobile-nav-actions .cart-nav-link {
    padding: 8px 12px;
}
@media (min-width: 992px) {
    /* On desktop the collapse is always open and the toggler auto-hides via
       Bootstrap, so this wrapper just shows the cart icon inline with the rest
       of the nav — no duplicate cart icon needed inside the collapse menu. */
    .mobile-nav-actions {
        order: 3;
        margin-left: 12px;
    }
}
/* Quick "Add to Cart" on product listing cards (search grid, homepage) */
.search-product-actions {
    display: flex;
    gap: 8px;
}
.search-product-actions .btn-enquiry {
    flex: 1;
    margin: 0;
}
.btn-quick-add {
    flex: 1;
    display: block;
    text-align: center;
    padding: 8px 10px;
    background: #D4AF37;
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}
.btn-quick-add:hover { background: #b9952c; }
.btn-quick-add:disabled { opacity: 0.6; cursor: not-allowed; }

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Cart / order tables */
.cart-table-wrap { overflow-x: auto; }
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.cart-table th, .cart-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}
.cart-table th { text-transform: uppercase; font-size: 12px; letter-spacing: .5px; color: #777; }

.cart-product-cell { display: flex; align-items: center; gap: 14px; }
.cart-product-cell img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.cart-product-name { font-weight: 600; }
.cart-product-sku, .cart-product-variant { font-size: 12px; color: #888; }

.qty-control { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 3px; }
.qty-btn {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
}
.qty-btn:hover { background: #e9e9e9; }
.qty-input {
    width: 48px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 16px;
    cursor: pointer;
}

.cart-summary {
    max-width: 420px;
    margin-left: auto;
    background: #f9f7f2;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px 24px;
    margin-top: 20px;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.cart-summary-total { font-weight: bold; font-size: 18px; border-top: 1px solid #ddd; margin-top: 8px; padding-top: 12px; }

.cart-actions { display: flex; justify-content: space-between; margin-top: 20px; }

/* Checkout wizard */
.checkout-steps { display: flex; gap: 24px; margin-bottom: 24px; }
.checkout-steps .step {
    font-weight: 600;
    color: #aaa;
    padding-bottom: 8px;
    border-bottom: 3px solid transparent;
}
.checkout-steps .step.active { color: #000; border-color: #D4AF37; }

.checkout-panel { background: #fff; padding: 10px 0 30px; }

.payment-option {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 14px 18px;
    display: inline-block;
}

/* Order success */
.order-success-box { padding: 40px 20px; }
.order-success-icon { font-size: 60px; color: #28a745; margin-bottom: 16px; }

.order-status-box {
    background: #f9f7f2;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 24px;
}
.status-pill {
    display: inline-block;
    background: #D4AF37;
    color: #000;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

/* ============================ ADMIN AREA ============================ */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.admin-login-box {
    max-width: 380px;
    margin: 80px auto;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 36px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.admin-table th, .admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}
.admin-table th { background: #faf9f6; text-transform: uppercase; font-size: 11px; color: #777; }

.admin-pagination { display: flex; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.admin-pagination a, .admin-pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #eee;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
}
.admin-pagination .active { background: #D4AF37; border-color: #D4AF37; color: #000; font-weight: bold; }
.admin-pagination .disabled { opacity: 0.4; pointer-events: none; }

.admin-detail-section { margin-bottom: 26px; }
.admin-detail-section h5 { border-bottom: 2px solid #D4AF37; display: inline-block; padding-bottom: 4px; margin-bottom: 12px; }

@media (max-width: 768px) {
    .cart-product-cell { flex-direction: column; align-items: flex-start; }
    .cart-summary { max-width: 100%; }
}

/* ===================== Sticky "View Cart" bar ===================== */
.cart-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: #1a1a1a;
    box-shadow: 0 -4px 16px rgba(0,0,0,.25);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    animation: cartBarSlideUp .25s ease-out;
}
.cart-sticky-bar.cart-bar-hidden { display: none !important; }
@keyframes cartBarSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.cart-sticky-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cart-sticky-info {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.cart-sticky-info i { color: #D4AF37; font-size: 18px; }
.cart-sticky-inner .btn-cart-primary {
    padding: 10px 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .cart-sticky-inner { gap: 10px; }
    .cart-sticky-info { font-size: 12.5px; }
    .cart-sticky-inner .btn-cart-primary { padding: 9px 14px; font-size: 13px; }
}
