/* Global Variables & Reset */
:root {
    --primary-color: #F6F7EB;
    --secondary-color: #ffffff;
    /* Adjusted for contrast against new primary */
    --accent-color: #E94F37;
    --accent-light: #ff6b52;
    --highlight-color: #2D3436;
    /* swapped for contrast */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #F6F7EB;
    --glass-bg: rgba(246, 247, 235, 0.85);
    --glass-border: 1px solid rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Typhography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Utilities */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.flex {
    display: flex;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--highlight-color);
    transition: var(--transition);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

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

.btn-outline {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* Navbar (Glassmorphism) */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    padding: 1.2rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.nav-icons a:hover {
    color: var(--highlight-color);
    transform: scale(1.1);
}

/* Product Card */
.product-card {
    background: var(--primary-color);
    border-radius: 0;
    /* Modern sharp edges or minimal radius */
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    height: 400px;
    background: #f0f0f0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-overlay {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}

.icon-btn {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem 0;
    text-align: left;
}

.product-name a {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.product-price {
    font-weight: 500;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Shop Page */
.shop-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding: 2rem 0;
}

/* Filter Sidebar */
.filters-sidebar {
    background: #fff;
    padding: 2rem;
    border: 1px solid #eee;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-list li {
    margin-bottom: 0.8rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    margin: 0;
    /* Reset default margins */
    cursor: pointer;
}

.filter-checkbox:hover {
    color: var(--accent-color);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    transition: var(--transition);
}

.page-link:hover,
.page-link.active {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--accent-color);
}

/* Footer */
.footer {
    background-color: var(--accent-color);
    color: #ccc;
    padding: 5rem 0 2rem;
}

.footer h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.footer ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Inputs */
input,
select,
textarea {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    width: 100%;
    transition: var(--transition);
}

input:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.cart-table th {
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    /* Keeping clean look */
    object-fit: cover;
}

.cart-action {
    color: var(--highlight-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.cart-summary {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 4px;
    /* Soft border radius for modern feel */
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Checkout */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding: 2rem 0;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method-card {
    border: 1px solid #eee;
    padding: 1.5rem;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method-card:hover,
.payment-method-card.active {
    border-color: var(--accent-color);
    background: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .shop-container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        display: none;
    }

    /* Or move to off-canvas */

    .grid {
        gap: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .mobile-toggle {
        display: block !important;
        order: 3;
        margin-left: 1rem;
    }

    .nav-icons {
        order: 2;
        margin-left: auto;
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid #eee;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        max-height: 350px;
    }

    .nav-link {
        padding: 1rem 2rem;
        display: block;
        border-bottom: 1px solid #f9f9f9;
        width: 100%;
    }

    .nav-link::after {
        display: none;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--highlight-color);
    color: var(--secondary-color);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
    transform: translateX(100%);
}

.toast.success {
    background-color: #28a745;
    color: white;
}

.toast.error {
    background-color: #dc3545;
    color: white;
}

.toast.info {
    background-color: var(--accent-color);
    color: white;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Authentication */
.auth-container {
    max-width: 400px;
    margin: 6rem auto;
    padding: 2.5rem;
    background: var(--primary-color);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 2rem;
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--accent-color);
    font-weight: 600;
}

/* Admin Dashboard */
.admin-body {
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    /* Sidebar layout */
}

.admin-sidebar {
    width: 260px;
    background-color: var(--highlight-color);
    color: var(--primary-color);
    padding: 2rem;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    overflow-y: auto;
}

.admin-logo {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--primary-color);
    text-decoration: none;
}

.admin-nav {
    list-style: none;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.admin-main {
    margin-left: 260px;
    flex: 1;
    padding: 2rem;
    width: calc(100% - 260px);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fixed typo */
    font-size: 1.2rem;
}

/* Admin Tables */
.admin-table-container {
    background: var(--primary-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-danger {
    background: #f8d7da;
    color: #721c24;
}

.admin-btn-action {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.admin-btn-action:hover {
    background-color: #f0f0f0;
}