﻿/* ===================== CSS VARIABLES ===================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --border: #e2e8f0;
    --white: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --text: #1e293b;
    --sidebar-width: 240px;
}

/* ===================== RESET & BASE ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    color: var(--text);
    background: var(--light-gray);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4 {
    color: var(--dark);
    margin-bottom: 10px;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

p { margin-bottom: 12px; }

/* ===================== TOP NAVIGATION ===================== */
.top-nav {
    background: var(--dark);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.nav-logo a {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo a:hover {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.cart-btn {
    background: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-btn:hover {
    background: var(--primary-dark) !important;
    color: var(--white) !important;
}

/* ===================== MAIN LAYOUT ===================== */
.main-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
    padding: 0 20px;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--white);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.sidebar-category {
    margin-bottom: 12px;
}

.sidebar-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-weight: 600;
    color: var(--dark);
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar-category-link:hover {
    background: var(--light-gray);
    color: var(--primary);
}

.sidebar-category-link i {
    font-size: 0.7rem;
    color: var(--gray);
    transition: transform 0.2s;
}

/* ---- Level 2: Subcategories ---- */
.sidebar-subcategories {
    list-style: none;
    padding-left: 10px;
    margin-top: 4px;
    display: none;
}

.sidebar-subcategory-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray);
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-subcategory-link:hover {
    color: var(--primary);
    background: var(--light-gray);
}

.sidebar-sub-chevron {
    font-size: 0.6rem;
    color: var(--gray);
}

/* ---- Level 3: Sub-Subcategories ---- */
.sidebar-subsubcategories {
    list-style: none;
    padding-left: 14px;
    margin-top: 2px;
    display: none;
}

.sidebar-subsubcategories li a {
    display: block;
    padding: 4px 10px;
    font-size: 0.82rem;
    color: #94a3b8;
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar-subsubcategories li a:hover {
    color: var(--primary);
    background: var(--light-gray);
}


/* ---- Expand/collapse open states ---- */
.sidebar-category.open > .sidebar-subcategories {
    display: block;
}

.sidebar-subcategory-item.open > .sidebar-subsubcategories {
    display: block;
}

/* Chevron rotation when open */
.sidebar-category.open > .sidebar-category-link i {
    transform: rotate(180deg);
}

.sidebar-subcategory-item.open > .sidebar-subcategory-link .sidebar-sub-chevron {
    transform: rotate(180deg);
}

/* ===================== CONTENT AREA ===================== */
.content {
    flex: 1;
    min-width: 0;
}

/* ===================== HERO BANNER ===================== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
}

.hero-banner h1 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 8px;
}

.hero-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ===================== SECTION TITLE ===================== */
.section-title {
    font-size: 1.3rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

/* ===================== PRODUCT GRID ===================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--white);
    border-radius: 8px;
    
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--light-gray);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--danger);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 12px;
    z-index: 10;
    font-size: 0.75rem;
    font-weight: 700;
}

.out-of-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--dark);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 12px;
    z-index: 10;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-card-info {
    padding: 12px 14px;
}

.product-card-info h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--dark);
}

.product-category {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-regular {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.price-original {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--gray);
}

.price-sale {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--danger);
}

.empty-state {
    text-align: center;
    color: var(--gray);
    padding: 40px;
    font-size: 1.1rem;
}

/* ===================== STATIC PAGE CONTENT ===================== */
.page-content {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.page-content h1 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.page-content h2 {
    margin-top: 24px;
    margin-bottom: 10px;
}

.page-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.page-content li {
    margin-bottom: 6px;
}

/* ===================== SHIPPING TABLE ===================== */
.shipping-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.shipping-table th {
    background: var(--light-gray);
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--border);
}

.shipping-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.shipping-table tr:hover td {
    background: var(--light-gray);
}

/* ===================== EMPTY CART ===================== */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.empty-cart-icon {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-cart h2 {
    margin-bottom: 8px;
}

.empty-cart p {
    color: var(--gray);
    margin-bottom: 20px;
}

.btn-continue-shopping {
    display: inline-block;
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-continue-shopping:hover {
    background: var(--primary-dark);
}

/* ===================== CONTACT FORM ===================== */
.contact-form {
    max-width: 600px;
    margin-top: 20px;
}

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.required {
    color: var(--danger);
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.validation-error {
    display: block;
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 4px;
}

.btn-submit {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* ---- CAPTCHA input ---- */
.captcha-input {
    max-width: 120px;
}


/* ---- Status messages ---- */
.status-message {
    display: block;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.status-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.status-warning {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ===================== GALLERY PLACEHOLDER ===================== */
.gallery-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    font-size: 1.1rem;
}


/* ===================== FOOTER ===================== */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 20px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .hero-banner h1 {
        font-size: 1.5rem;
    }
}

/* ===================== GALLERY PAGE ===================== */
.gallery-breadcrumb {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 12px;
    padding: 8px 0;
}

.gallery-breadcrumb a {
    color: var(--primary);
}

.gallery-breadcrumb a:hover {
    text-decoration: underline;
}

.gallery-heading {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.gallery-count {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 16px;
}

.gallery-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.gallery-sort label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
}

.sort-dropdown {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--dark);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.product-sku {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 6px;
    margin-bottom: 0;
}

/* ---- Gallery empty state ---- */
.empty-state .btn-continue-shopping {
    margin-top: 16px;
}

}

}


.product-card-image {
    cursor: pointer;
}

/* ===================== PRODUCT DETAIL PAGE ===================== */

.product-detail-wrapper {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* --- Image section --- */
.product-detail-images {
    flex: 0 0 420px;
    max-width: 420px;
}

.product-detail-main-image {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    width: 420px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 15px;
}

.sale-badge-large {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- Thumbnails --- */
.product-detail-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.thumb {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.thumb:hover {
    border-color: var(--primary);
}

.thumb-active {
    border-color: var(--primary);
}

.thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* --- Info section --- */
.product-detail-info {
    flex: 1;
    min-width: 300px;
}

.product-detail-name {
    font-size: 1.6rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.product-detail-sku {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

/* --- Price --- */
.product-detail-price {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.price-regular-large {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.price-original-large {
    font-size: 1.1rem;
    text-decoration: line-through;
    color: var(--gray);
    margin-right: 10px;
}

.price-sale-large {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--danger);
}

/* --- Stock --- */
.product-detail-stock {
    margin-bottom: 15px;
    font-size: 15px;
}

.in-stock {
    color: var(--success);
    font-weight: 600;
}

.out-of-stock {
    color: var(--danger);
    font-weight: 600;
}

/* --- Actions (qty + add to cart) --- */
.product-detail-actions {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-selector label {
    font-size: 15px;
    color: var(--dark);
    font-weight: 600;
}

.qty-input {
    width: 60px;
    height: 42px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

.btn-add-to-cart {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 11px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-to-cart:hover {
    background: var(--primary-dark);
}

.btn-add-to-cart-disabled {
    background: var(--gray);
    color: var(--white);
    border: none;
    padding: 11px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.7;
}

.validator-msg {
    color: var(--danger);
    font-size: 12px;
    display: block;
}

.cart-confirm-msg {
    background: #dcfce7;
    color: #166534;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 15px;
    border: 1px solid #86efac;
}

.cart-confirm-msg a {
    color: #166534;
    font-weight: 600;
    text-decoration: underline;
}

/* --- Category link --- */
.product-detail-category-link {
    margin-top: 15px;
    font-size: 14px;
}

/* --- Description section --- */
.product-detail-description {
    margin: 30px 0;
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.product-detail-description h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.product-detail-description h3 {
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
}

.product-detail-description p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 10px;
}

.no-description {
    font-style: italic;
    color: var(--gray);
}

/* --- Bullets --- */
.product-bullets {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.product-bullets li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--gray);
    border-bottom: 1px solid var(--light-gray);
}

.product-bullets li:last-child {
    border-bottom: none;
}

.product-bullets li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--success);
    font-weight: 700;
    font-size: 16px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .product-detail-wrapper {
        flex-direction: column;
    }
    .product-detail-images {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .product-detail-main-image {
        width: 100%;
        height: 320px;
    }
}

/* ===================== SHOPPING CART PAGE ===================== */

.cart-container {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-table thead th {
    background: var(--light-gray);
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--gray);
    border-bottom: 2px solid var(--border);
}

.cart-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cart-col-product { width: 45%; }
.cart-col-price   { width: 15%; }
.cart-col-qty     { width: 15%; }
.cart-col-total   { width: 15%; }
.cart-col-remove  { width: 10%; text-align: center; }

/* Product cell */
.cart-product {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cart-product-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px;
    background: var(--white);
    flex-shrink: 0;
}

.cart-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-product-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.cart-product-name:hover {
    color: var(--primary);
}

.cart-product-sku {
    font-size: 0.78rem;
    color: var(--gray);
}

/* Price and total cells */
.cart-unit-price {
    font-size: 0.95rem;
    color: var(--dark);
}

.cart-line-total {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
}

/* Quantity input */
.cart-qty-input {
    width: 60px;
    height: 38px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
    font-family: inherit;
    transition: border-color 0.2s;
}

.cart-qty-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Remove button */
.cart-remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.cart-remove-btn:hover {
    background: #fee2e2;
}

/* Cart actions bar */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-update-cart {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-update-cart:hover {
    background: var(--primary);
    color: var(--white);
}

/* Cart summary box */
.cart-summary {
    max-width: 380px;
    margin-left: auto;
    background: var(--light-gray);
    border-radius: 8px;
    padding: 20px 24px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--gray);
}

.cart-summary-total {
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

/* Checkout button */
.btn-checkout {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: var(--primary-dark);
}

/* ===================== CHECKOUT PAGE ===================== */

.checkout-summary {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.checkout-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.checkout-summary-table thead th {
    background: var(--light-gray);
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--border);
}

.checkout-summary-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.checkout-item-sku {
    font-size: 0.78rem;
    color: var(--gray);
}

.checkout-totals {
    max-width: 320px;
    margin-left: auto;
}

/* Checkout form */
.checkout-form {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.form-row-two {
    display: flex;
    gap: 16px;
}

.form-row-two > div {
    flex: 1;
}

/* PayPal section */
.checkout-paypal-section {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-align: center;
    margin-bottom: 20px;
}

.checkout-paypal-note {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-paypal-checkout {
    background: #0070ba;
    color: var(--white);
    border: none;
    padding: 14px 50px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 12px;
}

.btn-paypal-checkout:hover {
    background: #005ea6;
}

.checkout-back-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--gray);
    font-size: 0.9rem;
}

.checkout-back-link:hover {
    color: var(--primary);
}

/* ===================== ORDER CONFIRMATION PAGE ===================== */

.order-confirmation {
    background: var(--white);
    border-radius: 8px;
    padding: 40px 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-align: center;
}

.order-confirmation-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 16px;
}

.order-confirmation h2 {
    margin-bottom: 8px;
}

.order-number {
    font-size: 1.1rem;
    margin: 12px 0 24px 0;
}

.order-number strong {
    color: var(--primary);
    font-size: 1.3rem;
}

.order-details {
    text-align: left;
    margin: 24px 0;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
}

.order-shipping-info {
    text-align: left;
    margin: 20px 0;
    padding: 16px 20px;
    background: var(--light-gray);
    border-radius: 8px;
}

.order-shipping-info h3 {
    margin-bottom: 10px;
}

.order-shipping-info p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 0;
}

.order-status-info {
    margin: 20px 0;
}

.order-status-badge {
    display: inline-block;
    background: #fef9c3;
    color: #854d0e;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-note {
    color: var(--gray);
    font-size: 0.88rem;
    margin-top: 8px;
}

/* Text alignment helpers */
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ===================== CART/CHECKOUT RESPONSIVE ===================== */
@media (max-width: 768px) {
    .cart-table thead { display: none; }

    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        border-bottom: 2px solid var(--border);
        padding: 12px 0;
    }

    .cart-col-price::before { content: "Price: "; font-weight: 600; }
    .cart-col-qty::before { content: "Qty: "; font-weight: 600; }
    .cart-col-total::before { content: "Total: "; font-weight: 600; }
    .cart-col-remove { text-align: right; }

    .form-row-two {
        flex-direction: column;
        gap: 0;
    }

    .cart-summary {
        max-width: 100%;
    }

    .checkout-totals {
        max-width: 100%;
    }
}

/* ===================== CART COUNT BADGE ===================== */
.cart-count-badge {
    display: inline-block;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: 4px;
}

/* ===================== ADMIN PANEL ===================== */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header h2 {
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-add-product, .btn-logout, .btn-back, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
}

.btn-add-product {
    background: var(--success);
    color: var(--white) !important;
}
.btn-add-product:hover {
    background: #15803d;
}

.btn-logout {
    background: var(--danger);
    color: var(--white) !important;
}
.btn-logout:hover {
    background: #b91c1c;
}

.btn-back {
    background: var(--gray);
    color: var(--white) !important;
}
.btn-back:hover {
    background: #475569;
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark) !important;
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--border);
}

.btn-sm {
    padding: 6px 14px !important;
    font-size: 0.85rem !important;
}

/* ---- Admin filters/search ---- */
.admin-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-search-input {
    flex: 1;
    max-width: 350px;
}

/* ---- Admin messages ---- */
.admin-message {
    display: block;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.admin-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ---- Admin products table ---- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.admin-table thead th {
    background: var(--dark);
    color: var(--white);
    padding: 12px 14px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tbody tr:hover td {
    background: var(--light-gray);
}

.admin-thumb-cell {
    width: 60px;
    text-align: center;
}

.admin-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.admin-actions-cell {
    white-space: nowrap;
    width: 90px;
}

.btn-edit, .btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin-right: 4px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-edit {
    background: #dbeafe;
    color: #1e40af !important;
}
.btn-edit:hover {
    background: #bfdbfe;
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b !important;
}
.btn-delete:hover {
    background: #fecaca;
}

/* ---- Admin login ---- */
.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.admin-login-box {
    background: var(--white);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 400px;
}

.admin-login-box h2 {
    text-align: center;
    margin-bottom: 24px;
}

/* ---- Admin product edit form ---- */
.admin-form-wrapper {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.admin-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.admin-form-section:last-of-type {
    border-bottom: none;
}

.admin-form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.admin-checkbox-row {
    display: flex;
    align-items: center;
}

.admin-checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.admin-hint {
    font-size: 0.82rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.admin-hint code {
    background: var(--light-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.admin-img-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 10px;
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

/* ---- Responsive admin table ---- */
@media (max-width: 768px) {
    .admin-table {
        font-size: 0.8rem;
    }
    .admin-table thead {
        display: none;
    }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td {
        display: block;
        width: 100%;
    }
    .admin-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
    }
    .admin-table td {
        border-bottom: none;
    }
}

/* ---- Admin category filter bar ---- */
.admin-filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    background: var(--white);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.admin-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

.admin-filter-group label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.3px;
}

.admin-filter-dropdown {
    padding: 7px 10px !important;
    font-size: 0.9rem !important;
}

.admin-filter-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.admin-result-count {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 12px;
    padding-left: 4px;
}

.admin-result-count strong {
    color: var(--dark);
    font-size: 0.95rem;
}

/* ---- Responsive filter bar ---- */
@media (max-width: 768px) {
    .admin-filter-bar {
        flex-direction: column;
    }
    .admin-filter-group {
        width: 100%;
    }
    .admin-filter-actions {
        margin-left: 0;
    }
}

/* ---- Admin full-width (no sidebar) ---- */
.content.admin-fullwidth {
    flex: 1;
    max-width: 100%;
}
