/* assets/css/style.css - UPDATED */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* assets/css/style.css - CORRECTED :root BLOCK */

:root {
    /* ==================================================================== */
    /* == THIS IS THE FIX ================================================= */
    /* ==================================================================== */
    /*
        We now define our old variable names to simply use the value of the
        new dynamic variables that are injected by app.blade.php.
        This connects your entire existing theme to the dynamic settings.
    */
    --primary-color: var(--theme-primary-color, #2874f0);       /* Points to the dynamic color, with blue as a fallback */
    --accent-color: var(--theme-secondary-color, #ff9f00);     /* Points to the dynamic color, with orange as a fallback */

    /* The RGB value for transparent colors still needs to be defined. We can keep the default blue. */
    --primary-rgb: 40, 116, 240;

    /*
     * All other variables below this line remain exactly the same as they were.
     */
    --primary-light-color: #e9f2ff;
    --primary-dark-color: #1e5bb6;

    --secondary-color: #ffffff; /* Main page background */
    --section-card-bg: #ffffff;

    --accent-rgb: 255, 159, 0;
    --accent-dark-color: #e68f00;
    --success-color: #20c997;
    --danger-color: #dc3545;
    --danger-rgb: 220, 53, 69;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;

    --white-color: #ffffff;
    --white-color-rgb: 255, 255, 255;
    --black-color: #000000;

    --text-primary-color: #1a202c;
    --text-secondary-color: #4a5568;
    --text-muted-color: #718096;
    --text-placeholder-color: #a0aec0;
    --text-on-primary-color: var(--white-color);


    --border-color: #e2e8f0;
    --border-light-color: #f1f5f9;
    --border-radius-sm: 0.25rem;
    --border-radius: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    --border-radius-pill: 50rem;

    --font-family-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-family-headings: 'Poppins', var(--font-family-sans-serif);

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-base: 1.6;
    --line-height-sm: 1.4;
    --line-height-lg: 1.8;

    --header-height: 60px;
    --header-marketplace-bg: var(--white-color);
    --header-marketplace-text-color: var(--text-primary-color);
    --header-marketplace-border: 1px solid var(--border-color);

    --box-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --box-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --box-shadow-md: 0 6px 10px -2px rgba(0,0,0,0.08), 0 3px 6px -2px rgba(0,0,0,0.05);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --box-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    --transition-base: all 0.25s ease-in-out;
    --transition-fast: all 0.15s ease-in-out;

    --section-padding-y: 1.2rem;
}

/* --- Base & Typography --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family-sans-serif);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--text-primary-color);
    background-color: var(--secondary-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0; padding: 0;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-family-headings); font-weight: var(--font-weight-semibold); line-height: 1.3; color: var(--text-primary-color); margin-top: 0; margin-bottom: 0.75rem; }
h1 { font-size: 2.25rem; } h2 { font-size: 1.875rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.25rem; } h5 { font-size: 1.125rem; } h6 { font-size: 1rem; }
p { margin-top: 0; margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-dark-color); text-decoration: none; }
img, svg { max-width: 100%; height: auto; vertical-align: middle; }

.container-marketplace { max-width: 1320px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (max-width: 767.98px) { .container-marketplace { padding-left: 0.75rem; padding-right: 0.75rem; } }

/* --- Buttons --- */
.btn-marketplace { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-family-sans-serif); font-weight: var(--font-weight-medium); text-align: center; vertical-align: middle; cursor: pointer; user-select: none; border: 1px solid transparent; padding: 0.625rem 1.25rem; font-size: var(--font-size-sm); line-height: var(--line-height-sm); border-radius: var(--border-radius); transition: var(--transition-base); text-transform: capitalize; }
.btn-marketplace:hover { text-decoration: none; }
.btn-marketplace:focus, .btn-marketplace.focus { outline: 0; box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25); }
.btn-marketplace.disabled, .btn-marketplace:disabled { opacity: 0.65; pointer-events: none; }
.btn-marketplace-primary { color: var(--white-color); background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-marketplace-primary:hover { color: var(--white-color); background-color: var(--primary-dark-color); border-color: var(--primary-dark-color); }
.btn-marketplace-secondary { color: var(--text-primary-color); background-color: var(--white-color); border-color: var(--border-color); box-shadow: var(--box-shadow-xs); }
.btn-marketplace-secondary:hover { color: var(--primary-color); background-color: var(--primary-light-color); border-color: var(--primary-color); }
.btn-marketplace-accent { color: var(--white-color); background-color: var(--accent-color); border-color: var(--accent-color); }
.btn-marketplace-accent:hover { color: var(--white-color); background-color: var(--accent-dark-color); border-color: var(--accent-dark-color); }
.btn-marketplace-outline-primary { color: var(--primary-color); border-color: var(--primary-color); background-color: transparent; }
.btn-marketplace-outline-primary:hover { color: var(--white-color); background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-marketplace-sm { padding: 0.375rem 0.75rem; font-size: var(--font-size-xs); border-radius: var(--border-radius-sm); }
.btn-marketplace-lg { padding: 0.75rem 1.5rem; font-size: var(--font-size-base); border-radius: var(--border-radius-lg); }
.btn-marketplace i { margin-right: 0.5em; } .btn-marketplace .icon-only i { margin-right: 0; }

/* --- Forms --- */
.form-control-marketplace { display: block; width: 100%; padding: 0.625rem 0.875rem; font-size: var(--font-size-sm); font-weight: var(--font-weight-normal); line-height: var(--line-height-base); color: var(--text-primary-color); background-color: var(--white-color); background-clip: padding-box; border: 1px solid var(--border-color); appearance: none; border-radius: var(--border-radius); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); box-shadow: var(--box-shadow-inner); }
.form-control-marketplace:focus { color: var(--text-primary-color); background-color: var(--white-color); border-color: var(--primary-color); outline: 0; box-shadow: var(--box-shadow-inner), 0 0 0 0.2rem rgba(var(--primary-rgb), 0.2); }
.form-control-marketplace::placeholder { color: var(--text-placeholder-color); opacity: 1; }

/* --- Utility Classes --- */
.bg-primary-light { background-color: var(--primary-light-color) !important; }
.text-primary { color: var(--primary-color) !important; } .text-dark { color: var(--text-primary-color) !important; } .text-light-muted { color: var(--text-muted-color) !important; }
.rounded-sm { border-radius: var(--border-radius-sm) !important; } .rounded { border-radius: var(--border-radius) !important; } .rounded-md { border-radius: var(--border-radius-md) !important;} .rounded-lg { border-radius: var(--border-radius-lg) !important; } .rounded-xl { border-radius: var(--border-radius-xl) !important; } .rounded-pill { border-radius: var(--border-radius-pill) !important; } .rounded-circle { border-radius: 50% !important; }
.section-padding { padding-top: var(--section-padding-y); padding-bottom: var(--section-padding-y); }
.section-padding-sm { padding-top: calc(var(--section-padding-y) / 2); padding-bottom: calc(var(--section-padding-y) / 2); }
.section-padding-lg { padding-top: calc(var(--section-padding-y) * 1.5); padding-bottom: calc(var(--section-padding-y) * 1.5); }
.shadow-xs { box-shadow: var(--box-shadow-xs) !important; } .shadow-sm { box-shadow: var(--box-shadow-sm) !important; } .shadow { box-shadow: var(--box-shadow) !important; } .shadow-md { box-shadow: var(--box-shadow-md) !important; } .shadow-lg { box-shadow: var(--box-shadow-lg) !important; } .shadow-xl { box-shadow: var(--box-shadow-xl) !important; } .shadow-none { box-shadow: none !important; }
.mb-0 { margin-bottom: 0 !important; }

/* --- GLOBAL SECTION CARD CONTAINER STYLE --- */
.section-card-container {
    background-color: var(--section-card-bg);
    border: 1px solid var(--border-light-color);
    border-radius: var(--border-radius-xl);
    padding: 0; /* Header and content row manage their own padding */
    box-shadow: var(--box-shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-base);
    margin-bottom: var(--section-padding-y);
}
.section-card-container:hover {
    border-color: var(--primary-color); /* Themed by page-specific CSS */
    box-shadow: var(--box-shadow-md);
}
.section-card-container > .section-header {
    margin-left: 0 !important; margin-right: 0 !important; margin-top: 0 !important;
    border-top-left-radius: var(--border-radius-xl);
    border-top-right-radius: var(--border-radius-xl);
}
.section-card-container > .row,
.section-card-container > div:not(.section-header) {
    padding: var(--section-padding-y);
}
.flash-sale-section-fashion .container-marketplace.section-card-container > .row,
.flash-sale-section-digital .container-marketplace.section-card-container > .row { /* Specific for flash sale content row if needed */
    padding: 1.5rem;
}
