/**
 * Main Stylesheet
 * Light Olive Green and Purple Theme with RTL Support
 * Arabic E-commerce Website
 */


/* ===== CSS Variables ===== */

:root {
    --primary-purple: #3a0050;
    /* Primary Dark Background */
    --secondary-purple: #4d0066;
    /* Secondary Backgrounds (Cards/Menus) */
    --dark-accent: #660080;
    /* Darker Accent */
    --olive-primary: #a3b899;
    /* Primary Light Olive Green Accent */
    --olive-light: #cdd9c7;
    /* Light Olive Green for Hover */
    --olive-dark: #8c9b83;
    /* Dark Olive Green */
    --white: #ffffff;
    --text-light: #e0e0e0;
    /* Light text on dark background */
    --border-color: #5d1a73;
    /* Purple Border */
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --font-primary: 'Cairo', 'Arial', sans-serif;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-olive: 0 4px 15px rgba(163, 184, 153, 0.3);
}


/* ===== Reset & Base Styles ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-purple);
    color: var(--text-light);
    line-height: 1.6;
    direction: rtl;
    padding-top: 80px;
    /* Space for fixed header */
    padding-bottom: 200px;
    /* Space for fixed footer */
}

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


/* ===== Typography ===== */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--olive-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--olive-light);
}

.gold-text {
    /* Renamed conceptually, but keeping class name for compatibility */
    color: var(--olive-primary);
}


/* ===== Header Styles ===== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--secondary-purple) 0%, var(--primary-purple) 100%);
    border-bottom: 2px solid var(--olive-primary);
    box-shadow: var(--shadow-olive);
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--white);
}

.logo a {
    color: var(--white);
    text-decoration: none;
}

.logo a:hover {
    color: var(--olive-primary);
}


/* Search Bar */

.search-container {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-form {
    display: flex;
    position: relative;
    width: 100%;
}

.search-input {
    flex: 1;
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--secondary-purple);
    color: var(--white);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--olive-primary);
    box-shadow: 0 0 0 3px rgba(163, 184, 153, 0.2);
}

.search-btn {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.search-btn:hover {
    background: rgba(163, 184, 153, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.search-icon {
    font-size: 1rem;
    color: var(--olive-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Cart Icon */

.cart-icon-container {
    position: relative;
}

.cart-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--secondary-purple);
    border: 2px solid var(--olive-primary);
    border-radius: 50%;
    transition: var(--transition);
}

.cart-icon-link:hover {
    background: var(--olive-primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-olive);
}

.cart-icon {
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}


/* User Profile Container */

.user-profile-container {
    display: flex;
    align-items: center;
}


/* WhatsApp Button */

.whatsapp-btn-container {
    margin-left: 1rem;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #25d366;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    font-size: 1.5rem;
}


/* ===== Main Content ===== */

.main-content {
    min-height: calc(100vh - 280px);
    padding: 2rem 0;
}


/* ===== Product Grid ===== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.product-card {
    background: var(--secondary-purple);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    animation: fadeInUp 0.5s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--olive-primary);
    box-shadow: var(--shadow-olive);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--dark-accent);
}

.product-info {
    padding: 0.8rem;
}

.product-name {
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 0.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.product-description {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-price {
    font-size: 1.2rem;
    color: var(--olive-primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-stock {
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
}

.product-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.in-stock {
    color: var(--success);
}

.out-of-stock {
    color: var(--danger);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--olive-primary);
    color: var(--primary-purple);
    width: 100%;
}

.btn-primary:hover {
    background: var(--olive-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-olive);
}

.btn-primary:disabled {
    background: var(--dark-accent);
    color: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--olive-primary);
    border: 2px solid var(--olive-primary);
}

.btn-secondary:hover {
    background: var(--olive-primary);
    color: var(--primary-purple);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #d32f2f;
}


/* ===== Page Title ===== */

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--olive-primary);
}


/* ===== Cart Styles ===== */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--secondary-purple);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.cart-table th {
    background: var(--dark-accent);
    color: var(--olive-primary);
    font-weight: 600;
}

.cart-table tr:hover {
    background: var(--dark-accent);
}

.cart-summary {
    background: var(--secondary-purple);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--olive-primary);
    margin-top: 2rem;
}

.cart-total {
    font-size: 1.5rem;
    color: var(--olive-primary);
    font-weight: bold;
    margin-bottom: 1rem;
}

.quantity-input {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    background: var(--dark-accent);
    color: var(--white);
    border-radius: var(--border-radius);
}


/* ===== Form Styles ===== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-weight: 600;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    background: var(--secondary-purple);
    color: var(--white);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--olive-primary);
    box-shadow: 0 0 0 3px rgba(163, 184, 153, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}


/* ===== Invoice Styles ===== */

.invoice-container {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--white);
    color: var(--primary-purple);
    /* Text color changed to purple for better contrast on white */
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.invoice-header {
    text-align: center;
    border-bottom: 3px solid var(--olive-primary);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.invoice-details {
    margin-bottom: 2rem;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.invoice-table th,
.invoice-table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: right;
    color: var(--primary-purple);
    /* Ensure text is readable on white/light gray */
}

.invoice-table th {
    background: var(--olive-primary);
    color: var(--primary-purple);
}

.print-btn {
    margin-top: 2rem;
}


/* ===== Mobile Categories Navigation ===== */

.mobile-categories-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    border-top: 2px solid var(--olive-primary);
    padding: 0.75rem 0;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(163, 184, 153, 0.3);
}

.mobile-categories-nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-categories-nav ul::-webkit-scrollbar {
    display: none;
}

.mobile-categories-nav li {
    flex: 0 0 auto;
    text-align: center;
}

.mobile-categories-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--border-radius);
    min-width: 70px;
}

.mobile-categories-nav a:hover,
.mobile-categories-nav a.active {
    color: var(--olive-primary);
    background: var(--dark-accent);
}

.mobile-categories-nav .category-icon {
    font-size: 1.5rem;
}

.mobile-categories-nav .category-name {
    font-size: 0.7rem;
    font-weight: 600;
}


/* ===== Footer Styles ===== */

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    border-top: 2px solid var(--olive-primary);
    padding: 2rem 0 1rem;
    z-index: 1000;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-title {
    color: var(--olive-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--olive-primary);
    padding-right: 0.5rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    color: var(--text-light);
}

.social-link:hover {
    color: var(--olive-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}


/* ===== Admin Styles ===== */

.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
}

.admin-nav {
    background: var(--secondary-purple);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 2px solid var(--olive-primary);
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 0.5rem 1rem;
    background: var(--dark-accent);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.admin-nav a:hover {
    background: var(--olive-primary);
    color: var(--primary-purple);
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid #2196f3;
    color: #2196f3;
}


/* ===== Responsive Design ===== */

@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    /* Admin tables responsive */
    .cart-table,
    .invoice-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    /* Two column grids become single column */
    .products-grid[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    }
    /* Checkout page responsive */
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
        /* Only space for search bar */
        padding-bottom: 70px;
        /* Space for mobile categories nav */
    }
    /* Hide footer on mobile, show categories nav */
    .site-footer {
        display: none;
    }
    .mobile-categories-nav {
        display: block;
    }
    /* Mobile Header - Show only search bar */
    .site-header {
        padding: 0.5rem 0;
        height: auto;
    }
    .header-content {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0;
        align-items: center;
    }
    /* Hide logo on mobile */
    .logo {
        display: none;
    }
    /* Hide whatsapp on mobile, but show cart and login */
    .whatsapp-btn-container {
        display: none;
    }
    /* Show cart and user profile on mobile */
    .cart-icon-container,
    .user-profile-container {
        display: flex;
        flex-shrink: 0;
    }
    /* Make search bar flex but allow cart/login */
    .search-container {
        flex: 1;
        max-width: 100%;
        margin: 0;
        min-width: 0;
    }
    /* Adjust header layout for mobile */
    .header-content {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
    .logo h1 {
        font-size: 1.3rem;
    }
    .search-container {
        order: 2;
        flex: 1;
        min-width: 0;
    }
    .search-form {
        width: 100%;
    }
    .search-input {
        padding: 0.6rem 2.5rem 0.6rem 0.8rem;
    }
    .search-btn {
        left: 0.4rem;
        width: 24px;
        height: 24px;
    }
    .cart-icon-container {
        order: 1;
    }
    .user-profile-container {
        order: 3;
    }
    /* Make cart and login buttons smaller on mobile */
    .cart-icon-link {
        width: 40px;
        height: 40px;
    }
    .cart-icon {
        font-size: 1.2rem;
    }
    .user-profile-container .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .user-profile-container>div {
        flex-wrap: nowrap;
        gap: 0.3rem;
        align-items: center;
    }
    .user-profile-container .user-name-text {
        font-size: 0.85rem;
        display: none;
        /* Hide on tablet, show on larger mobile if space */
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.6rem;
    }
    .product-image {
        height: 140px;
    }
    .product-info {
        padding: 0.6rem;
    }
    .product-name {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    .product-description {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }
    .product-price {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    .product-stock {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }
    .product-card .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.2rem;
    }
    .cart-table,
    .invoice-table {
        font-size: 0.85rem;
        display: block;
        width: 100%;
        overflow-x: auto;
    }
    .cart-table th,
    .cart-table td,
    .invoice-table th,
    .invoice-table td {
        padding: 0.5rem;
        min-width: 80px;
    }
    /* Hide some table columns on mobile */
    .cart-table th:nth-child(5),
    .cart-table td:nth-child(5) {
        display: none;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .admin-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    .admin-nav a {
        width: 100%;
        text-align: center;
    }
    /* Admin dashboard cards */
    .products-grid[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    /* Product page responsive */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    /* Checkout page */
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    /* Form responsive */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    /* Admin tables - stack on mobile */
    .cart-table thead {
        display: none;
    }
    .cart-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 2px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        background: var(--secondary-purple);
    }
    .cart-table td {
        display: block;
        text-align: right !important;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
    .cart-table td:last-child {
        border-bottom: none;
    }
    .cart-table td:before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        min-width: 100px;
        color: var(--olive-primary);
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px;
        /* Keep space for search bar with cart and login */
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.6rem;
    }
    .logo h1 {
        font-size: 1.1rem;
    }
    .search-input {
        font-size: 0.9rem;
        padding: 0.6rem 2.5rem 0.6rem 0.8rem;
    }
    .search-btn {
        left: 0.4rem;
        width: 24px;
        height: 24px;
        padding: 0.25rem;
    }
    .search-icon {
        font-size: 0.85rem;
    }
    .cart-icon-link {
        width: 38px;
        height: 38px;
    }
    .cart-icon {
        font-size: 1.1rem;
    }
    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    .user-profile-container .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    .user-profile-container .user-name-text {
        display: none;
        /* Hide username text on small mobile, show only button */
    }
    .invoice-container {
        padding: 1rem;
        margin: 1rem;
    }
    .invoice-table {
        font-size: 0.8rem;
    }
    .invoice-table th,
    .invoice-table td {
        padding: 0.4rem;
    }
    .page-title {
        font-size: 1.5rem;
        padding: 0.5rem 0;
    }
    .product-card {
        margin-bottom: 1rem;
    }
    .product-image {
        height: 200px;
    }
    .cart-summary {
        padding: 1.5rem;
    }
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
    }
    /* Admin specific */
    .admin-container {
        padding: 1rem 10px;
    }
    .admin-nav {
        padding: 0.75rem;
    }
    /* Statistics cards smaller */
    .product-card[style*="text-align: center"] h2 {
        font-size: 2rem !important;
    }
    .product-card[style*="text-align: center"] p {
        font-size: 1rem !important;
    }
}


/* Extra small devices */

@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    .login-container {
        padding: 2rem 1.5rem;
    }
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    .product-image {
        height: 130px;
    }
    .search-input {
        padding: 0.5rem 2rem 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    .search-btn {
        left: 0.3rem;
        width: 20px;
        height: 20px;
        padding: 0.15rem;
    }
    .search-icon {
        font-size: 0.75rem;
    }
}


/* ===== Loading Animation ===== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--olive-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ===== Empty State ===== */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}


/* ===== Product Detail Page ===== */

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}


/* ===== Checkout Page Grid ===== */

.checkout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}


/* ===== Admin Tables Mobile Labels ===== */

@media (max-width: 768px) {
    .cart-table td {
        position: relative;
        padding-right: 40%;
    }
    .cart-table td:before {
        content: attr(data-label);
        position: absolute;
        right: 0;
        font-weight: bold;
        color: var(--olive-primary);
    }
    /* Add data labels via JavaScript or manually in HTML */
}


/* ===== Form Grid Responsive ===== */

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    .checkout-grid {
        grid-template-columns: 1fr !important;
    }
    .order-info-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ===== Order Info Grid ===== */

.order-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}