/*
 * DhuMall modern storefront design system
 * Scoped by inclusion in site.layouts.master (customer storefront only).
 */

:root {
    --dm-ink: #172033;
    --dm-muted: #667085;
    --dm-soft: #f5f7fb;
    --dm-line: #e7eaf0;
    --dm-surface: #ffffff;
    --dm-primary-ink: #5f4700;
    --dm-radius-sm: 10px;
    --dm-radius: 16px;
    --dm-radius-lg: 22px;
    --dm-shadow-sm: 0 2px 10px rgba(23, 32, 51, .06);
    --dm-shadow: 0 12px 32px rgba(23, 32, 51, .10);
    --dm-shadow-lg: 0 24px 64px rgba(23, 32, 51, .16);
    --dm-transition: 180ms cubic-bezier(.2, .8, .2, 1);
}

html { scroll-behavior: smooth; }

body {
    color: var(--dm-ink);
    background: var(--dm-soft);
    font-family: var(--global-font), "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body, button, input, select, textarea { font-family: inherit; }

a, button, input, select, textarea { transition: border-color var(--dm-transition), box-shadow var(--dm-transition), color var(--dm-transition), background-color var(--dm-transition), transform var(--dm-transition); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
    outline-offset: 2px;
}

.main-body, .page-wrapper { background: var(--dm-soft); }
.main-body { min-height: 55vh; }
.page-wrapper { overflow: clip; }
.layout-wrapper { width: min(100% - 32px, 1280px); margin-inline: auto; }

.header-bottom, .bottom-header {
    background: #fff;
    border-block: 1px solid var(--dm-line);
    box-shadow: var(--dm-shadow-sm);
}

.first-dropdown, .child-dropdown, .dropdown-menu, .category-menu {
    overflow: hidden;
    border: 1px solid var(--dm-line) !important;
    border-radius: var(--dm-radius) !important;
    background: #fff;
    box-shadow: var(--dm-shadow-lg) !important;
}
.first-dropdown li, .child-dropdown li { border-color: var(--dm-line) !important; }
.menuss-hover { transition: background-color var(--dm-transition), padding var(--dm-transition); }
.menuss-hover:hover { padding-inline-start: 20px; background: var(--dm-soft); }

/* Search and controls */
input:not([type="checkbox"]):not([type="radio"]), select, textarea, .form-control {
    min-height: 46px;
    border: 1px solid #d7dce5 !important;
    border-radius: var(--dm-radius-sm) !important;
    background-color: #fff;
    color: var(--dm-ink);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus, .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 18%, transparent) !important;
    outline: 0;
}

button[class*="primary-bg"], a[class*="primary-bg"], .btn-primary, .primary-bg-color {
    border-radius: var(--dm-radius-sm);
}
button[class*="primary-bg"]:hover, a[class*="primary-bg"]:hover, .btn-primary:hover {
    filter: saturate(1.05) brightness(.97);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary-color) 28%, transparent);
    transform: translateY(-1px);
}

/* Content surfaces and cards */
.bg-white, .customer-panel, .address-card, .orders-table-card, .downloads-table-card,
.order-info-card, .membership-plan-card, .membership-table-panel, .point-table-card,
.point-summary-card, .credits-balance-card, .credits-summary-card, .address-edit-card {
    border-color: var(--dm-line) !important;
}

.address-card, .orders-table-card, .downloads-table-card, .order-info-card,
.membership-plan-card, .membership-table-panel, .point-table-card, .point-summary-card,
.credits-balance-card, .credits-summary-card, .address-edit-card {
    border-radius: var(--dm-radius) !important;
    box-shadow: var(--dm-shadow-sm);
}

.p-card, .product-card, [class*="product-card"] {
    border: 1px solid var(--dm-line);
    border-radius: var(--dm-radius) !important;
    background: #fff;
    box-shadow: var(--dm-shadow-sm);
    transition: transform var(--dm-transition), box-shadow var(--dm-transition), border-color var(--dm-transition);
}
.p-card:hover, .product-card:hover, [class*="product-card"]:hover {
    border-color: color-mix(in srgb, var(--primary-color) 45%, var(--dm-line));
    box-shadow: var(--dm-shadow);
    transform: translateY(-4px);
}
.p-card img, .product-card img, [class*="product-card"] img { border-radius: 14px; }
.hover-icon [class*="rounded-full"] { box-shadow: 0 5px 14px rgba(23, 32, 51, .13); }

/* Tables */
.customer-table, .orders-table, .downloads-table, .order-items-table,
.point-history-table, .credits-table, table.table {
    overflow: hidden;
    border: 1px solid var(--dm-line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--dm-radius);
    background: #fff;
}
.customer-table thead, .orders-table thead, .downloads-table thead,
.order-items-table thead, .point-history-table thead, .credits-table thead, table.table thead {
    background: #f8fafc;
}
.customer-table th, .orders-table th, .downloads-table th, .order-items-table th,
.point-history-table th, .credits-table th, table.table th {
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.customer-table th, .customer-table td, .orders-table th, .orders-table td,
.downloads-table th, .downloads-table td, .order-items-table th, .order-items-table td,
.point-history-table th, .point-history-table td, .credits-table th, .credits-table td {
    padding: 15px 16px !important;
    border-color: var(--dm-line) !important;
}
.customer-table tbody tr:hover, .orders-table tbody tr:hover, .downloads-table tbody tr:hover,
.point-history-table tbody tr:hover, .credits-table tbody tr:hover { background: #fafbfc; }

/* Breadcrumbs, pagination and account navigation */
[class*="breadcrumb"] { color: var(--dm-muted); }
[class*="breadcrumb"] a:hover { color: var(--dm-ink); }
.pagination { display: flex; gap: 6px; }
.pagination a, .pagination span, [class*="pagination"] a, [class*="pagination"] button {
    border-radius: 9px !important;
}
.account-sidebar, .user-sidebar, aside[class*="sidebar"] {
    border: 1px solid var(--dm-line);
    border-radius: var(--dm-radius);
    background: #fff;
    box-shadow: var(--dm-shadow-sm);
}

/* Dialogs */
.modal-h, [class*="modal-content"], [role="dialog"] {
    border: 1px solid rgba(255, 255, 255, .65) !important;
    border-radius: var(--dm-radius-lg) !important;
    box-shadow: var(--dm-shadow-lg) !important;
}
.modal-overlay, .delete-modal, .pass-modal { backdrop-filter: blur(5px); }

@media (max-width: 767px) {
    .layout-wrapper { width: min(100% - 24px, 1280px); padding-inline: 0 !important; }
    .p-card:hover, .product-card:hover, [class*="product-card"]:hover { transform: none; }
    .customer-table th, .customer-table td, .orders-table th, .orders-table td,
    .downloads-table th, .downloads-table td, .order-items-table th, .order-items-table td,
    .point-history-table th, .point-history-table td, .credits-table th, .credits-table td {
        padding: 12px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
