/* Minimal styles for Baro product list UI */
:root{
    --brand:#2b6cb0;
    --muted:#666;
    --bg:#f7fafc;
}
*{box-sizing:border-box}
body{font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;margin:0;background:var(--bg);color:#111;font-weight:300}
.container{max-width:1100px;margin:0 auto;padding:20px}
.site-header{background:var(--brand);color:#fff;border-bottom:none;margin-top:0}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:12px 20px}
.brand{font-weight:800;color:#fff;text-decoration:none;font-size:2.2rem;display:inline-block;line-height:1}
.brand-row{display:inline-flex;align-items:center;gap:2px}
.brand-logo{height:60px;width:auto;vertical-align:middle;margin-right:2px}
/* Header tagline under brand */
.brand .tagline, .tagline{display:block;font-size:0.82rem;color:rgba(255,255,255,0.92);font-weight:400;margin-top:2px}
.brand-block{display:flex;flex-direction:column;align-items:flex-start}
.main-nav a{margin-left:14px;color:rgba(255,255,255,0.95);text-decoration:none;font-weight:600}
.main-nav a:hover{color:rgba(255,255,255,1)}
.main-nav .badge{background:#ffffff;color:var(--brand);border-radius:999px;padding:4px 10px;margin-left:8px;font-size:0.85rem;font-weight:700}

/* Top bar (same color as header) holding main navigation links */
.top-bar{background:var(--brand);color:#fff;border-bottom:none}
.top-inner{display:flex;align-items:center;justify-content:flex-end;padding:0px;gap:12px}
.top-nav{display:flex;gap:14px;flex-wrap:wrap;justify-content:flex-end}
.top-nav a{color:rgba(255,255,255,0.95);text-decoration:none;font-weight:600;display:inline-flex;align-items:center;height:32px;padding:0 6px;font-size:0.86rem}
.top-nav a:hover{color:#fff}

/* Emphasize the Login button but keep it compact and aligned */
.top-nav .login-btn{background:#fff;color:var(--brand);padding:4px 8px;border-radius:6px;font-weight:700;text-decoration:none;box-shadow:none;display:inline-flex;align-items:center;height:28px;font-size:0.82rem}
.top-nav .login-btn:hover{background:#f7fafc;color:var(--brand)}
.top-nav .login-btn:focus{outline:2px solid rgba(255,255,255,0.12);outline-offset:2px}

/* Search form in the main header (next to brand) */
.search-form{display:flex;align-items:center;gap:6px;background:#fff;padding:4px;border-radius:10px;border:1px solid rgba(0,0,0,0.06);box-shadow:0 1px 2px rgba(11,55,88,0.03)}
.search-input{height:32px;box-sizing:border-box;padding:0 10px;border-radius:6px;border:none;width:280px;background:transparent;color:#111;font-weight:400}
.search-input::placeholder{color:#9aa6b2}
.search-input:focus{outline:none}
/* make search button blend inside the box */
.search-form .btn-ghost{background:transparent;color:var(--brand);border:none;padding:6px;width:32px;height:32px;border-radius:6px}
.search-form .btn-ghost:hover{background:rgba(43,108,176,0.06)}
/* icon sizing */
.icon-btn{display:inline-grid;place-items:center;padding:0;width:32px;height:32px;border-radius:6px}
.icon-btn .icon{color:var(--brand);width:16px;height:16px}
.icon-btn svg{display:block}

/* Ensure icon button matches input height */
.icon-btn{display:inline-grid;place-items:center;padding:0;width:40px;height:40px;border-radius:8px}
.icon-btn .icon{color:var(--brand);width:18px;height:18px}
.icon-btn svg{display:block}

/* Compact icon button for search */
.icon-btn{display:inline-grid;place-items:center;padding:6px;width:40px;height:40px;border-radius:8px}
.icon-btn .icon{color:var(--brand);width:18px;height:18px}
.icon-btn svg{display:block}

/* Search form removed (moved or omitted). Keep general .btn-ghost styles below. */

/* Responsive adjustments for mobile */
@media (max-width:640px){
    .top-inner{padding:6px 10px;gap:8px}
    .top-nav{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
    .top-nav a{white-space:nowrap;padding-right:12px}
    .top-nav::-webkit-scrollbar{display:none}
    .header-inner{flex-direction:column;align-items:flex-start;gap:8px}
    .search-input{width:100%}
    .brand-logo{height:46px;margin-right:2px}
    .container{padding-left:12px;padding-right:12px}
}
.cart-link{display:inline-flex;align-items:center}
.products{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:12px}
.product-card{background:#fff;border:1px solid #e6edf3;padding:10px;border-radius:8px;display:flex;flex-direction:column;min-height:320px}
.product-thumb-wrap{position:relative;margin-bottom:8px}
.product-card h3{margin:0 0 4px 0;font-size:0.94rem;line-height:1.25;min-height:2.4em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-card p{margin:2px 0;color:var(--muted);font-size:0.84rem;line-height:1.25}
.product-card .store-name{margin:0 0 4px 0;font-size:0.78rem;font-weight:600;color:var(--brand);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-card .desc{min-height:2.6em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-card .price{margin-top:6px;font-size:0.9rem;font-weight:700;color:#0f172a}
.product-card img{width:100%;aspect-ratio:1 / 1;height:auto;object-fit:contain;background:#f8fafc;border-radius:6px;border:1px solid #eef2f7}
.product-thumb{width:72px;height:72px;object-fit:cover;border-radius:6px}
.product-thumb.rounded{border-radius:6px}
.product-actions{margin-top:auto;display:flex;gap:6px;align-items:center}
.product-card{position:relative;overflow:hidden}
.card-link{position:absolute;inset:0;z-index:1;text-indent:-9999px;background:transparent}
.product-card:hover{transform:translateY(-4px);box-shadow:0 8px 30px rgba(11,55,88,0.08);transition:all 160ms ease}
.product-card:focus-within{box-shadow:0 8px 30px rgba(11,55,88,0.1)}
.product-actions{position:relative;z-index:2}
.card-link:focus{outline:3px solid rgba(43,108,176,0.18);outline-offset:-3px}
.btn{background:var(--brand);color:#fff;padding:8px 12px;border-radius:6px;border:none;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:8px}
.btn.small{padding:6px 10px;font-size:0.9rem}

/* Fallbacks for common daisyUI button variants used in templates */
.btn-primary{background:var(--brand);color:#fff}
.btn-secondary{background:#6b7280;color:#fff}
.btn-ghost{background:transparent;color:var(--brand);border:1px solid transparent}
.btn-ghost:hover{background:rgba(43,108,176,0.06)}
.btn-error{background:#ef4444;color:#fff}
.btn-sm{padding:6px 8px;font-size:0.85rem}
.btn-outline{background:transparent;border:1px solid #d1e6f8;color:var(--brand)}
.btn-active{background:#1e40af;color:#fff}

/* Ensure links styled as buttons behave consistently */
a.btn{display:inline-flex;align-items:center;gap:8px}

.pagination{margin-top:18px;display:flex;align-items:center;gap:12px}
.site-footer{padding:18px 0;text-align:center;color:var(--muted);margin-top:28px}

/* Form inputs — force light appearance regardless of OS dark mode */
input[type=text],
input[type=email],
input[type=password],
input[type=tel],
input[type=number],
input[type=search],
textarea,
select {
    background:#fff !important;
    color:#111 !important;
    border:1px solid #d1d5db;
    border-radius:6px;
    padding:8px 12px;
    width:100%;
    font-size:0.95rem;
    font-family:inherit;
    box-sizing:border-box;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=tel]:focus,
textarea:focus,
select:focus {
    outline:2px solid var(--brand);
    outline-offset:0;
    border-color:var(--brand);
}
input::placeholder,
textarea::placeholder { color:#9ca3af !important; }

/* Labels */
label { display:block; font-size:0.9rem; font-weight:500; color:#374151; margin-bottom:4px; }

/* form.as_p wrapper */
.form-card p { margin-bottom:14px; }
.form-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:32px; }

/* Alert boxes */
.alert { padding:10px 14px; border-radius:6px; font-size:0.9rem; margin-bottom:12px; }
.alert-error { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.alert-success { background:#f0fdf4; color:#166534; border:1px solid #bbf7d0; }

@media (max-width:520px){.header-inner{padding:10px}}

/* Premium Variation Modal Styles */
.var-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.var-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.var-modal-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.25), 
                0 0 0 1px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(10px);
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.var-modal-backdrop.active .var-modal-container {
    transform: scale(1) translateY(0);
}

.var-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(241, 245, 249, 0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    transition: all 150ms ease;
    z-index: 10;
}

.var-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.var-modal-content {
    padding: 24px;
}

.var-product-info {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.var-product-img-wrap {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.var-product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.var-product-meta {
    flex-grow: 1;
}

.color-brand {
    color: var(--brand);
}

.var-price-stock {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
}

.var-divider {
    border: 0;
    border-top: 1px solid #f1f5f9;
    margin: 16px 0;
}

.var-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.var-chip {
    padding: 10px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    background: #fff;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 80px;
}

.var-chip:hover {
    border-color: var(--brand);
    background: rgba(43, 108, 176, 0.02);
    transform: translateY(-1px);
}

.var-chip.selected {
    border-color: var(--brand);
    background: #e8f2fb;
    color: #1e3a5f;
    box-shadow: 0 2px 8px rgba(43, 108, 176, 0.12);
}

.var-chip.selected .var-opt-name {
    color: var(--brand);
    font-weight: 600;
}

.var-chip.out-of-stock {
    opacity: 0.5;
    background: #f1f5f9;
    border-color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

.var-qty-submit-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.var-qty-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 44px;
}

.qty-btn {
    width: 36px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 100ms ease;
}

.qty-btn:hover {
    background: #f1f5f9;
}

.var-qty-selector input {
    width: 44px;
    text-align: center;
    border: none !important;
    padding: 0 !important;
    font-weight: 600;
    font-size: 1rem;
    background: transparent !important;
    outline: none !important;
}

.var-qty-selector input::-webkit-outer-spin-button,
.var-qty-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.var-submit-btn {
    flex-grow: 1;
    height: 44px;
    border-radius: 12px;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(43, 108, 176, 0.2);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.var-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(43, 108, 176, 0.3);
}

