/* --- Base Variables & Reset --- */
:root {
    --bg-color: #fbfbf9;
    --text-main: #333333;
    --text-muted: #666666;
    --accent-color: #8c8374;
    --hero-bg: #d1cbc1;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* Added smooth scrolling for a premium feel */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: transparent;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 10;
}

.nav-links a, .nav-icons a {
    margin: 0 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.logo h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff;
}

/* --- Hero Section --- */
.hero {
    height: 85vh;
    background-color: var(--hero-bg);
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1578749556568-bc2c40e68b61?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.btn-primary {
    background-color: #fff;
    color: var(--text-main);
    padding: 12px 32px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background-color: #f0f0f0;
}

/* --- Trending Section --- */
.trending {
    padding: 5rem 5%;
    text-align: center;
}

.section-title {
    margin-bottom: 3rem;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: #fff;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #f4f4f4;
    margin-bottom: 1rem;
}

.product-info h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.product-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-secondary {
    background-color: var(--text-main);
    color: #fff;
    padding: 12px 40px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background-color: #555;
}

/* --- Footer Section --- */
.site-footer {
    background-color: var(--text-main);
    color: #fbfbf9;
    padding: 5rem 5% 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.brand-column h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.brand-column p {
    color: #b3b3b3;
    font-size: 0.9rem;
}

.footer-column h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: #b3b3b3;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #fff;
}

.newsletter p {
    color: #b3b3b3;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter form {
    display: flex;
    gap: 0.5rem;
}

.newsletter input {
    padding: 10px;
    border: 1px solid #555;
    background: transparent;
    color: #fff;
    outline: none;
    flex: 1;
}

.newsletter button {
    background-color: #fff;
    color: var(--text-main);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: background 0.3s ease;
}

.newsletter button:hover {
    background-color: #ddd;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        background-color: rgba(0,0,0,0.5);
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .newsletter form {
        flex-direction: column;
    }
}
/* --- Internal Page Styles (shop.php) --- */

/* Make navbar background dark for pages without a full hero image */
.nav-dark {
    background-color: var(--text-main);
    position: relative; /* Removes the absolute positioning from the homepage */
}

/* Smaller header for internal pages */
.page-header {
    height: 35vh;
    background-color: var(--hero-bg);
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1610701596007-11502861dcfa?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center 30%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 400;
}

/* Shop Layout */
.shop-container {
    padding: 4rem 5%;
}

/* Filter Bar */
.shop-filters {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
}

.shop-filters a {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.shop-filters a:hover, .shop-filters a.active {
    color: var(--text-main);
    font-weight: 500;
}

/* Typography tweaks for product cards */
.category-label {
    font-size: 0.8rem !important;
    color: #999 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.price {
    font-weight: 500;
    color: var(--text-main) !important;
}

@media (max-width: 768px) {
    .shop-filters {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
/* --- Authentication Pages (Login / Register) --- */
.bg-light {
    background-color: var(--bg-color);
}

.auth-section {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 5%;
}

.auth-container {
    background: #fff;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.error-box {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid #f5c6cb;
}

.auth-form .input-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    border-color: var(--accent-color);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.auth-options a {
    color: var(--text-muted);
    text-decoration: underline;
}

.btn-full {
    width: 100%;
    display: block;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--text-main);
    font-weight: 500;
    text-decoration: underline;
}/* --- Cart Page Styles --- */
.cart-section {
    padding: 4rem 5%;
    min-height: 70vh;
}

.cart-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cart-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.cart-header p {
    color: var(--text-muted);
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cart Items on the Left */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.cart-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    background-color: #f4f4f4;
}

.item-details {
    flex: 1;
}

.item-details h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.item-price {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Minimalist Quantity Selector */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    width: fit-content;
}

.qty-btn {
    background: transparent;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.qty-btn:hover {
    color: var(--text-main);
}

.quantity-control input {
    width: 40px;
    text-align: center;
    border: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

/* Item Totals & Remove */
.item-total {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
}

.item-total p {
    font-weight: 500;
    font-size: 1.1rem;
}

.remove-btn {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    transition: color 0.3s;
    text-decoration: underline;
}

.remove-btn:hover {
    color: #d9534f; /* Subtle red for delete action */
}

/* Order Summary Box on the Right */
.order-summary {
    background-color: #f9f9f8; /* Very light earthy gray */
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px; /* Keeps it on screen as user scrolls */
}

.order-summary h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.taxes-note {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 2rem;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: underline;
}

.continue-shopping:hover {
    color: var(--text-main);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .cart-container {
        grid-template-columns: 1fr; /* Stacks the summary under the items */
    }
    
    .order-summary {
        position: static;
    }
}

@media (max-width: 500px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
    }
    
    .item-total {
        height: auto;
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        margin-top: 1rem;
    }
}
/* --- About Page Styles --- */

/* Hero Section tailored for the factory vibe */
.about-hero {
    height: 50vh;
    background-color: var(--hero-bg);
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1565193566173-7a0cb3d16853?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    margin-top: 70px; /* Offset for absolute navbar */
}

.about-hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

/* Story Section */
.factory-story {
    padding: 6rem 5%;
    background-color: var(--bg-color);
}

.story-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.story-text h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.story-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.story-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* Process Section */
.factory-process {
    padding: 5rem 5% 8rem;
    background-color: #f4f3f0; /* Slightly darker earthy tone to break up the page */
    text-align: center;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.process-step {
    text-align: left;
}

.process-step img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.process-step h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .story-container {
        grid-template-columns: 1fr;
    }
    
    .story-image {
        order: -1; /* Puts image above text on mobile */
    }
}
/* --- Account Dashboard Styles --- */
.account-section {
    padding: 4rem 5%;
    min-height: 70vh;
    background-color: var(--bg-color);
}

.account-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar Styling */
.account-sidebar h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.account-menu {
    list-style: none;
}

.account-menu li {
    margin-bottom: 1rem;
}

.account-menu a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: block;
    padding: 8px 0;
}

.account-menu a:hover, .account-menu a.active {
    color: var(--text-main);
    font-weight: 500;
}

.logout-link {
    margin-top: 2rem;
    color: #d9534f !important; /* Subtle red for logout */
    border-top: 1px solid #eee;
    padding-top: 1rem !important;
}

/* Main Content Styling */
.content-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1.5rem;
}

.content-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Order Table Styling */
.table-responsive {
    overflow-x: auto;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.order-table th {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 1rem;
    border-bottom: 2px solid #eee;
}

.order-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    vertical-align: middle;
}

.fw-500 {
    font-weight: 500;
}

.text-muted {
    color: #999;
    font-size: 0.85rem;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.status-processing {
    background-color: #fcf0d3;
    color: #8a6d3b;
}

.status-delivered {
    background-color: #e6f4ea;
    color: #1e4620;
}

/* Actions */
.view-btn {
    text-decoration: underline;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.view-btn:hover {
    color: var(--text-main);
}

.empty-state {
    text-align: center;
    padding: 4rem 0;
    background: #fff;
    border: 1px dashed #ccc;
}

.empty-state p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .account-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .account-sidebar {
        border-bottom: 1px solid #eee;
        padding-bottom: 2rem;
    }
    
    .account-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .account-menu a {
        padding: 5px 10px;
        background: #f4f4f4;
        border-radius: 4px;
    }
    
    .logout-link {
        margin-top: 0;
        border-top: none;
        padding-top: 5px !important;
        background: #fff0f0 !important;
    }
}
/* --- Admin Dashboard Styles --- */
.admin-body {
    background-color: #f4f5f7; /* Slightly cooler grey for the backend */
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background-color: #222;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.admin-brand {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #333;
}

.admin-brand h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    font-weight: 400;
}

.admin-brand p {
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-nav {
    list-style: none;
    padding: 1.5rem 0;
    flex: 1;
}

.admin-nav li a {
    display: block;
    padding: 12px 1.5rem;
    color: #bbb;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.admin-nav li a:hover, .admin-nav li a.active {
    background-color: #333;
    color: #fff;
    border-left: 3px solid var(--accent-color);
}

.admin-bottom-nav {
    padding: 1.5rem;
    border-top: 1px solid #333;
}

.admin-bottom-nav a {
    display: block;
    color: #bbb;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.admin-bottom-nav a:hover {
    color: #fff;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 260px; /* Offset for fixed sidebar */
    padding: 2rem 3rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-weight: 400;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--text-main);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
}

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-left: 4px solid transparent;
}

.stat-card.warning {
    border-left-color: #f0ad4e;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.stat-card a {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-decoration: none;
}

/* Admin Panels & Tables */
.admin-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(22, 26, 29, 0.06);
    border: 1px solid #eceff1;
    padding: 1.4rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid #f0f2f4;
    padding-bottom: 0.85rem;
}

.panel-header h2 {
    font-size: 1.2rem;
    font-weight: 500;
}

.btn-small {
    padding: 6px 15px;
    font-size: 0.8rem;
    background-color: var(--text-main);
    color: #fff;
}

.admin-table th {
    background-color: #f9f9f9;
}

.status-dropdown {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
}

.status-pending { background-color: #fdf3d8; color: #8a6d3b; }
.status-shipped { background-color: #d1ecf1; color: #0c5460; }

/* Responsive Admin */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 80px;
    }
    .admin-brand h2, .admin-brand p, .admin-nav li a span, .admin-bottom-nav a {
        display: none; /* Hide text on small screens, ideally add icons here later */
    }
    .admin-main {
        margin-left: 80px;
        padding: 1.5rem;
    }
}
/* --- Admin Inventory Styles --- */

/* Success Message */
.success-banner {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    border-left: 4px solid #28a745;
    font-size: 0.95rem;
}

/* Layout for forms and tables */
.inventory-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.1fr) minmax(560px, 1.9fr);
    gap: 1.3rem;
    align-items: start;
}

/* Admin Form Styling */
.admin-form .form-group {
    margin-bottom: 1.2rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

.admin-form input,
.admin-form select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d8dde2;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form input:focus,
.admin-form select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(89, 111, 126, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sub-field-group {
    margin-top: 0.8rem;
}

.inline-action-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.upload-btn {
    margin-top: 0.5rem;
}

.image-preview {
    margin-top: 0.75rem;
    max-width: 120px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.btn-full-admin {
    width: 100%;
    padding: 12px;
    background-color: var(--text-main);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-full-admin:hover {
    background-color: #444;
}

/* Inventory Table Adjustments */
.search-input {
    padding: 8px 12px;
    border: 1px solid #d8dde2;
    border-radius: 8px;
    font-size: 0.85rem;
    min-width: 190px;
}

.item-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f4f4f4;
}

.d-block { display: block; }
.text-small { font-size: 0.75rem; }

/* Stock Badges */
.stock-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.in-stock {
    background-color: #e6f4ea;
    color: #1e4620;
}

.low-stock {
    background-color: #f8d7da;
    color: #721c24;
}

.btn-outline-small {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: transparent;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-outline-small:hover {
    background: #f4f4f4;
}

/* Responsive adjustments for Inventory */
@media (max-width: 1200px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }
}
/* --- SMS Settings & Toggles --- */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.toggle-label {
    margin-bottom: 0 !important;
    font-size: 1rem !important;
}

/* The Switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--text-main);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--text-main);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Checkbox Lists */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400 !important;
    text-transform: none !important;
    font-size: 0.95rem !important;
    color: var(--text-muted) !important;
    cursor: pointer;
}

.checkbox-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
/* --- Variations Builder Styles --- */
.variations-builder {
    background-color: #f8fafb;
    border: 1px solid #e8ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.1rem;
}

.variations-header h3 {
    font-size: 1.02rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.variations-header p {
    margin: 0 0 0.9rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.variation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
    background: #fff;
    padding: 0.75rem;
    border: 1px solid #e3e8ec;
    border-radius: 8px;
}

.var-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 0.6rem;
    flex: 1;
}

.var-inputs input {
    margin-bottom: 0 !important; /* Overrides default form-group margin */
    padding: 9px 10px !important;
    font-size: 0.83rem !important;
    min-width: 0;
}

.btn-remove-var {
    background: #fff6f6;
    border: 1px solid #f6d6d5;
    color: #c4514d;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    line-height: 1;
}

.btn-remove-var:hover {
    background: #ffeaea;
    color: #9c2f2b;
}

.add-var-btn {
    margin-top: 0.35rem;
    width: auto !important;
    border-style: dashed !important;
}

/* --- Variable Product Table Styles --- */
.parent-row {
    background-color: #fdfdfd;
}

.parent-row td {
    border-bottom: none !important;
    padding-bottom: 0.5rem !important;
}

.child-row td {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    background-color: #fff;
}

.child-row:last-of-type td {
    border-bottom: 2px solid #eee !important;
    padding-bottom: 1.5rem !important;
}

.child-details {
    padding-left: 4.5rem !important; /* Indents the child rows past the parent image */
    display: flex;
    flex-direction: column;
}

.var-sku {
    font-size: 0.75rem;
    color: #999;
    font-family: monospace;
}

.var-attr {
    font-size: 0.85rem;
    color: var(--text-main);
}

.stock-action-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Responsive fixes for the variation grid */
@media (max-width: 900px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .inline-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .var-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-input {
        width: 100%;
        min-width: 0;
    }

    .variation-row {
        grid-template-columns: 1fr;
    }

    .btn-remove-var {
        justify-self: end;
    }
}