/* 
   Kolhapuri Leather - Premium Design System v5.3.1
   "The Uncongested Update" - Optimized for Spacing, Clarity & Perfect Wrapping
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800&family=Outfit:wght@300;400;500;600;700&family=Inter:wght@400;500&display=swap');

:root {
    --primary: #3E2C22;
    --primary-light: #5D4335;
    --secondary: #8B5A2B;
    --accent: #D4AF37;
    --cream: #FDFBF7;
    --white: #FFFFFF;
    --bg-main: #FAF9F6;
    --text-dark: #1A120E;
    --text-muted: #71665F;

    --success: #2D6A4F;
    --warning: #B07D05;
    --danger: #991B1B;
    --info: #1E40AF;

    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --gutter: 60px;
    /* Increased for breathing room */
    --panel-width: 280px;
    --container-width: 1400px;

    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 15px 45px rgba(62, 44, 34, 0.08);
    --shadow-lg: 0 25px 70px rgba(62, 44, 34, 0.12);

    --transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
    padding-top: 100px;
    /* Account for fixed header height */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Cinzel', serif;
    color: var(--primary);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Helpers */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}


.text-center {
    text-align: center;
}

.text-gold {
    color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-gold {
    background: var(--accent);
    color: #fff;
}

/* --- Frontend Website Styles --- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    z-index: 2000;
    transition: var(--transition);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    margin-left: 15px;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    box-shadow: var(--shadow-sm);
}

#header .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Cinzel', serif;
}

#header .nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.desktop-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.desktop-nav a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.nav-icon {
    font-size: 1.25rem;
    color: var(--primary);
}

.hero {
    min-height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)),
        url('https://images.unsplash.com/photo-1549298916-b41d501d3772?q=80&w=2012&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 4.5rem;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}



.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-img {
    height: 350px;
    position: relative;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-details {
    padding: 25px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 15px;
}

/* Footer Styles Fix */
footer {
    background: var(--primary);
    color: #fff;
    padding: 100px 0 60px;
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    opacity: 0.6;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--accent);
}

/* Dashboard Structural Fixes */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

.sidebar {
    width: var(--panel-width);
    background: var(--primary);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    padding: 0;
    /* Changed to handle sub-containers */
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 25px 15px;
}

.user-profile-mini {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin: 0 20px 20px;
}

.sidebar-menu-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 15px 20px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-menu-container::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.sidebar-menu {
    list-style: none;
}

.scroll-indicator {
    padding: 10px 15px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    border-radius: 10px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(5px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 0.6;
    }
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--primary);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    transition: var(--transition);
}

.logout-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    color: var(--accent);
}

.main-content {
    margin-left: var(--panel-width);
    flex: 1;
    padding: var(--gutter);
    overflow-y: auto;
}

/* Header/Top Bar Fix */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

/* Card Optimisation */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    padding: 35px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}


.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* Form Spacing */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    height: 60px;
    padding: 0 25px;
    border-radius: 15px;
    border: 1.5px solid #F1F5F9;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    background: #fff;
    display: block;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* Autofill Premium Correction */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-dark);
    -webkit-box-shadow: 0 0 0px 1000px #fff inset;
    transition: background-color 5000s ease-in-out 0s;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 1200px) {
    .desktop-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .desktop-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 30px 20px;
    }

    body {
        padding-top: 70px;
    }

    /* Table Fix for Mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
        border: 1px solid #f1f5f9;
        display: block;
        width: 100%;
    }

    table {
        min-width: 800px;
        /* Force minimum width to trigger scroll */
    }

    /* Header Mobile Adjustments */
    #header {
        padding: 0 15px;
        height: 70px;
    }

    .logo a {
        font-size: 1.2rem !important;
    }

    .nav-actions {
        gap: 10px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

/* Mobile Hero Fixes & General Responsiveness */
@media (max-width: 768px) {

    /* Global Adjustments */
    :root {
        --gutter: 20px;
        /* Reduces container padding to prevent congestion */
    }

    body,
    html {
        overflow-x: hidden;
        /* Prevent horizontal scrolling */
        width: 100%;
    }

    /* Typography Scaling */
    h1,
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    h2,
    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 30px !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    p,
    .hero p {
        font-size: 1rem;
        line-height: 1.6;
        padding: 0 10px;
    }

    /* Layout Adjustments */
    .hero {
        padding-top: 80px;
        /* Avoid header overlap */
        min-height: auto;
        /* Allow content to dictate height on small screens */
        padding-bottom: 50px;
    }

    .hero-content {
        width: 100%;
        padding: 0 10px;
    }

    /* Force stacking for flex containers in hero */
    .hero div[style*="display: flex"] {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 15px !important;
    }

    .hero .btn {
        width: 100%;
        max-width: 100%;
        /* Full width buttons for touch targets */
        margin: 5px 0;
        justify-content: center;
    }

    /* Reduce generous padding on sections */
    section[style*="padding: 100px"] {
        padding: 50px 0 !important;
    }

    /* Filter/Search Form */
    form[action="index.php#shop"] {
        padding: 20px !important;
        flex-direction: column;
    }

    form[action="index.php#shop"]>div {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Product Grid - Ensure single column if needed or smaller */
    .products-grid {
        grid-template-columns: 1fr;
        /* Single column for better visibility */
        gap: 30px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 40px;
    }

    /* Value Propositions Grid */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}