/* custom.css — Shared global styles for the Eccommerce brand identity
   These move previously inlined <style> blocks and dialog.js styles
   into a single maintainable file. Colour values are dynamic via
   the CSS custom properties set by theme.config.js.php. */

/* ═══════════════════════════════════════════════════════════
   Material Symbols — base configuration
   ═══════════════════════════════════════════════════════════ */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ═══════════════════════════════════════════════════════════
   Custom Scrollbar — subtle, brand-aligned
   ═══════════════════════════════════════════════════════════ */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--brand-secondary, #C084FC);
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary, #6B21A8);
}
.custom-scrollbar {
    -ms-overflow-style: -ms-autohiding-scrollbar;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-secondary, #C084FC) transparent;
}

/* ═══════════════════════════════════════════════════════════
   Global utility helpers
   ═══════════════════════════════════════════════════════════ */
.font-primary { font-family: var(--font-primary, 'EB Garamond'), sans-serif; }
.font-secondary { font-family: var(--font-secondary, 'Montserrat'), sans-serif; }

/* Button micro-interaction: subtle press-down */
.btn-active-state {
    transition: transform 0.1s ease;
}
.btn-active-state:active {
    transform: scale(0.97);
}

/* Card hover lift */
.card-hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   Dialog System (previously injected by dialog.js)
   ═══════════════════════════════════════════════════════════ */
.custom-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-in;
}
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.dialog-container {
    background: var(--brand-background, #FAFAFA);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}
.dialog-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--brand-outline);
}
.dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-primary, #6B21A8);
    margin: 0;
    font-family: var(--font-primary, 'EB Garamond'), sans-serif;
}
.dialog-body {
    padding: 24px;
}
.dialog-body p {
    margin: 0;
    color: var(--brand-on-background, #121212);
    line-height: 1.5;
    font-family: var(--font-secondary, 'Montserrat'), sans-serif;
}
.dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--brand-outline);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--brand-surface-container-low, #F3F3F3);
}
.dialog-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: var(--font-secondary, 'Montserrat'), sans-serif;
}
.dialog-btn-primary {
    background: var(--brand-primary, #6B21A8);
    color: var(--brand-on-primary, #FFFFFF);
}
.dialog-btn-primary:hover {
    background: var(--brand-primary, #6B21A8);
    filter: brightness(1.1);
}
.dialog-btn-secondary {
    background: var(--brand-background, #FAFAFA);
    color: var(--brand-on-background, #121212);
    border: 1px solid var(--brand-outline);
}
.dialog-btn-secondary:hover {
    background: var(--brand-outline-variant, #e0e3e8);
}
.dialog-btn-danger {
    background: var(--brand-error, #ba1a1a);
    color: var(--brand-on-error, #FFFFFF);
}
.dialog-btn-danger:hover {
    filter: brightness(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
