/* Additional storefront and authentication styles; load AFTER the original styles.css. */
[hidden] { display: none !important; }
.account-link, .logout-link, .account-chip { font-family: inherit; display: inline-flex; align-items:center; justify-content:center; gap:.45rem; font-size:.88rem; line-height:1.3; white-space:nowrap; }
.account-link { border:1px solid #f5b48e; background:#fff7f0; color:#c85520; border-radius:99px; padding:.72rem .96rem; cursor:pointer; font-weight:800; }
.account-link:hover { background:#ffead9; }
.account-link .icon { width:17px; height:17px; }
.account-chip { border-radius:99px; padding:.65rem .85rem; background:#edf9f3; border:1px solid #cae9d8; color:#145333; font-weight:700; max-width:180px; overflow:hidden; text-overflow:ellipsis; }
.account-chip .icon { width:16px; height:16px; flex-shrink:0; }
.logout-link { text-decoration:none; color:#ad4150; background:#fff; border:1px solid #ead5d8; border-radius:99px; padding:.7rem .82rem; font-weight:700; }
.admin-mini { background:#caeee0; color:#145333; border-radius:99px; padding:2px 6px; font-size:.7rem; }
.mobile-auth-button, .mobile-current-user { width:100%; text-align:right; padding:14px 18px; color:#b94d1a; background:transparent; border:none; cursor:pointer; font:inherit; font-weight:700; }
.storefront-products-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(228px,1fr)); gap:18px; margin-top:18px; }
.storefront-product-card { min-width:0; overflow:hidden; border:1px solid #f0e9e2; background:white; border-radius:20px; box-shadow:0 7px 18px rgba(44,32,18,.05); display:flex; flex-direction:column; }
.storefront-product-image { height:195px; background:#faf7f4; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.storefront-product-image img { width:100%; height:100%; object-fit:cover; }
.storefront-product-details { padding:15px; display:flex; flex-direction:column; gap:8px; flex:1; }
.storefront-category-tag { font-size:.72rem; font-weight:750; color:#dc6b36; }
.storefront-product-details h3 { font-size:1.04rem; margin:0; font-weight:800; color:#20242d; line-height:1.55; }
.storefront-variant,.storefront-description { margin:0; color:#717985; font-size:.82rem; }
.storefront-description { line-height:1.7; min-height:0; }
.storefront-product-bottom { margin-top:auto; display:flex; gap:8px; justify-content:space-between; align-items:center; }
.storefront-price { font-size:.96rem; color:#1f2937; }
.storefront-stock { font-size:.78rem; font-weight:700; color:#217a51; }
.storefront-add { display:flex !important; align-items:center; justify-content:center; width:100%; margin-top:8px; text-decoration:none; font:inherit; font-size:.88rem; font-weight:800; text-align:center; padding:11px 12px; }
.storefront-add[disabled],.storefront-add.aspNetDisabled { opacity:.5; cursor:not-allowed; }
.storefront-flash { display:block; background:#effaf2; border:1px solid #c7e9d2; border-radius:12px; margin:12px 0; padding:11px 14px; color:#236342; font-size:.88rem; }
.dynamic-cart-items { display:grid; gap:15px; width:100%; }
.dynamic-cart-item { display:flex; align-items:flex-start; gap:12px; border-bottom:1px solid #ece7e2; padding:10px 0; }
.dynamic-cart-item img { width:75px; height:75px; object-fit:cover; flex-shrink:0; border-radius:12px; background:#f8f5f0; }
.dynamic-cart-item-description { display:flex; flex:1; gap:6px; min-width:0; flex-direction:column; font-size:.83rem; }
.dynamic-cart-item-description strong { font-weight:800; color:#17232d; }
.dynamic-cart-item-description span { color:#64707f; }
.cart-remove { text-decoration:none; color:#b63844; align-self:flex-start; font-weight:700; }
.cart-grand-total { margin:20px 0 8px; display:flex; justify-content:space-between; gap:12px; font-size:.92rem; }
.cart-checkout-notice { font-size:.81rem; line-height:1.8; color:#705632; background:#fff5e8; padding:12px; border-radius:12px; }
body.timash-auth-is-open { overflow:hidden; }
.timash-auth-modal { position:fixed; inset:0; z-index:99999; display:grid; place-items:center; padding:18px; }
.auth-backdrop { position:absolute; inset:0; background:rgba(15,24,35,.68); backdrop-filter:blur(4px); }
.auth-panel { isolation:isolate; position:relative; z-index:1; background:#fff; border-radius:24px; width:min(100%,455px); max-height:calc(100dvh - 36px); overflow-y:auto; padding:27px; box-shadow:0 24px 80px rgba(0,0,0,.22); outline:none; }
.auth-x { border:0; position:absolute; top:13px; left:14px; background:#f7f4f2; border-radius:50%; width:36px; height:36px; font-size:23px; line-height:1; cursor:pointer; color:#666; }
.auth-heading { display:flex; flex-direction:column; align-items:center; gap:5px; text-align:center; margin:0 0 16px; }
.auth-heading img { object-fit:contain; }
.auth-heading h2 { font-size:1.28rem; font-weight:900; margin:3px 0; color:#17232d; }
.auth-heading p { font-size:.83rem; color:#79828f; margin:0; }
.auth-switch { display:grid; grid-template-columns:1fr 1fr; background:#f8f5f2; padding:5px; border-radius:14px; gap:4px; margin-bottom:17px; }
.auth-tab { font:inherit; font-weight:800; font-size:.95rem; padding:12px; border-radius:10px; border:0; background:transparent; color:#696d74; cursor:pointer; }
.auth-tab.is-active { background:#fff; box-shadow:0 2px 9px rgba(0,0,0,.07); color:#e46e34; }
.auth-pane label { display:block; font-size:.82rem; font-weight:750; margin:11px 0 6px; color:#344052; }
.auth-input { box-sizing:border-box; display:block; border-radius:12px; width:100%; padding:12px 13px; font:inherit; background:#fff; border:1px solid #dfe3e8; color:#1f2937; direction:rtl; outline:none; transition:border-color .18s,box-shadow .18s; }
.auth-input:focus { border-color:#f47b42; box-shadow:0 0 0 3px rgba(242,101,34,.12); }
.auth-input::placeholder { color:#a4abb4; }
.auth-name-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.auth-submit { margin-top:20px; width:100%; display:block !important; cursor:pointer; font:inherit; font-size:.94rem; font-weight:800; border:0; padding:13px; }
.auth-hint { text-align:center; color:#7b8692; font-size:.75rem; line-height:1.8; margin:15px 0 0; }
.auth-alert { border-radius:10px; background:#fff0ef; color:#ae3434; border:1px solid #f4ccca; font-size:.84rem; padding:10px 12px; margin-bottom:13px; line-height:1.75; }
@media(max-width:750px) { .account-chip { max-width:116px; font-size:.78rem; } .logout-link { padding:.56rem .65rem; } .account-link { font-size:.8rem; padding:.57rem .66rem; } .storefront-products-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .storefront-product-image { height:135px; } .storefront-product-details { padding:10px; } .storefront-description { display:none; } .storefront-product-details h3 { font-size:.89rem; } .storefront-price { font-size:.78rem; } .storefront-add { font-size:.75rem; } }
@media(max-width:420px) { .auth-panel { padding:19px; } .auth-name-grid { grid-template-columns:1fr; gap:0; } .storefront-product-bottom { flex-wrap:wrap; } .account-chip .icon { display:none; } }


/* ===== Timash responsive + horizontal-overflow fix (v3) =====
   The original assets/css/styles.css is owned by the existing project and must load first.
   Fix sizing at source; overflow-x acts only as a last-resort guard for decorative graphics.
*/
html, body { max-width:100%; overflow-x:hidden; }
*, *::before, *::after { box-sizing:border-box; }
#form1, main, .site-header, .site-footer, .hero-section, .category-section,
.product-section, .features-section, .about-section, .faq-section, .bottom-cta {
    max-width:100%; min-width:0;
}
.container, .hero-grid, .hero-grid > *, .category-grid, .product-shell,
.storefront-products-grid, .footer-content, .about-grid, .faq-grid,
.section-heading, .section-heading > *, .bottom-cta-inner, .bottom-cta-text {
    min-width:0; max-width:100%;
}
img, video, svg { max-width:100%; }
.hero-section { overflow:hidden; overflow:clip; }
.hero-grid { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); align-items:center; }
.hero-content { min-width:0; max-width:100%; }
.hero-title-dynamic, #hero-title {
    max-width:100%; min-width:0; width:100%;
    font-size:clamp(2rem,4vw,4.5rem);
    line-height:1.36; white-space:normal;
    overflow-wrap:break-word; word-break:normal;
}
.hero-dynamic-title { display:inline; white-space:normal; overflow-wrap:break-word; }
.hero-title-dot { white-space:nowrap; }
.hero-desc { max-width:min(100%,590px); white-space:normal; overflow-wrap:break-word; }
.hero-actions { max-width:100%; display:flex; flex-wrap:wrap; gap:12px; }
.hero-actions .btn { max-width:100%; white-space:normal; }
.hero-visual { min-width:0; max-width:100%; }
.hero-main-art { max-width:100%; object-fit:contain; }
.hero-halo, .hero-bottom-curve { max-width:100%; }
.category-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,195px),1fr)); }
.category-card { min-width:0; max-width:100%; overflow:hidden; }
.category-art, .category-info { min-width:0; max-width:100%; }
.category-art img { display:block; max-width:100%; height:auto; }
.filter-row {
    max-width:100%; min-width:0;
    overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch; scrollbar-width:thin;
}
.filter-chip { flex-shrink:0; }
.storefront-products-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,225px),1fr)); }
.storefront-product-bottom { min-width:0; flex-wrap:wrap; }
.storefront-price { overflow-wrap:anywhere; }
.site-header .header-inner, .site-header .header-actions { min-width:0; max-width:100%; }
.brand, .brand-copy, .brand-title, .brand-subtitle { min-width:0; }
.brand img { display:block; max-width:100%; height:auto; }
.announcement-inner, .section-heading.between, .bottom-cta-inner { min-width:0; }
.cart-drawer { max-width:100vw; width:min(100vw,440px); }
.timash-auth-modal { max-width:100vw; width:100%; }
.auth-panel { width:min(100%,455px); }
.auth-pane, .auth-name-grid, .auth-name-grid > div { min-width:0; }
.mobile-menu { max-width:100vw; }
.mobile-bottom-nav { max-width:100vw; box-sizing:border-box; }

@media (max-width: 1000px) {
    .hero-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:15px; }
    .hero-title-dynamic, #hero-title { font-size:clamp(1.9rem,4.6vw,3.2rem); }
    .float-tag { max-width:45%; }
}
@media (max-width: 760px) {
    .hero-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
    .hero-section .hero-content { width:100%; text-align:center; }
    .hero-section .eyebrow, .hero-section .hero-actions, .hero-section .hero-footnote {
        justify-content:center; max-width:100%;
    }
    .hero-title-dynamic, #hero-title {
        font-size:clamp(1.8rem,6vw,2.6rem); line-height:1.45;
        margin-inline:auto; text-align:center; padding-inline:0;
    }
    .hero-desc { margin-inline:auto; text-align:center; }
    .hero-visual { width:100%; max-width:480px; margin-inline:auto; overflow:hidden; }
    .hero-main-art { display:block; position:relative; width:100%; height:auto; max-height:330px; inset:auto; margin:auto; transform:none; }
    .hero-halo { max-width:100%; }
    .hero-visual .float-tag { display:none; }
    .hero-actions .btn { flex:0 1 auto; }
    .about-grid, .faq-grid { display:grid; grid-template-columns:minmax(0,1fr); }
    .about-visual { max-width:100%; min-width:0; }
    .footer-content { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
    .section-heading.between { display:flex; flex-wrap:wrap; gap:12px; }
    .section-heading.between > * { min-width:0; }
    .header-inner { gap:9px; }
    .site-header .header-actions { gap:7px; }
    .account-chip { max-width:130px; }
    .cart-drawer { width:min(100vw,440px); }
    .filter-row { display:flex; flex-wrap:nowrap; }
}
@media (max-width: 520px) {
    .container { width:100%; max-width:100%; padding-inline:14px; }
    .announcement-inner { display:flex; justify-content:center; flex-wrap:wrap; gap:3px 12px; }
    .announcement-city { white-space:normal; }
    .site-header .header-inner { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; }
    .site-header .brand { flex:0 1 auto; max-width:46%; }
    .site-header .brand-mark img { width:42px; }
    .site-header .brand-title { font-size:1.12rem; }
    .site-header .brand-subtitle { display:none; }
    .site-header .header-actions { flex:0 1 auto; gap:6px; }
    .site-header .location-chip { display:none; }
    .site-header .account-link, .site-header .logout-link { padding:7px 8px; font-size:.73rem; }
    .site-header .account-link .icon { display:none; }
    .site-header .account-chip { max-width:105px; padding:6px 7px; font-size:.7rem; }
    .site-header .circle-action { flex-shrink:0; }
    .hero-section { padding-block:24px 34px; }
    .hero-title-dynamic, #hero-title { font-size:clamp(1.7rem,7vw,2.2rem); line-height:1.5; }
    .hero-desc { font-size:.89rem; line-height:1.9; }
    .hero-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
    .hero-actions .btn { min-width:0; padding:12px 8px; text-align:center; font-size:.81rem; }
    .hero-visual { width:100%; max-width:360px; }
    .hero-main-art { width:100%; max-height:280px; }
    .category-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .category-card { padding:0; }
    .category-name { font-size:.82rem; overflow-wrap:break-word; }
    .category-info { padding:10px; }
    .storefront-products-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .storefront-product-image { height:145px; }
    .storefront-product-details { min-width:0; }
    .section-heading h2, .bottom-cta h2 { overflow-wrap:break-word; }
    .bottom-cta-inner { display:block; }
    .bottom-cta .cta-button { margin-top:12px; }
    .footer-content { grid-template-columns:minmax(0,1fr); }
    .mobile-bottom-nav { width:100%; left:0; right:0; }
    .auth-panel { max-height:calc(100dvh - 20px); padding:18px; border-radius:18px; }
    .auth-name-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .auth-input { width:100%; min-width:0; }
}
@media (max-width: 360px) {
    .site-header .header-inner { gap:5px; }
    .site-header .brand { max-width:38%; }
    .site-header .brand-mark img { width:36px; }
    .site-header .account-link, .site-header .logout-link { font-size:.68rem; padding:6px; }
    .site-header .account-chip { max-width:75px; }
    .hero-title-dynamic, #hero-title { font-size:1.6rem; }
    .hero-actions { grid-template-columns:minmax(0,1fr); }
    .category-grid { gap:7px; }
    .category-info { padding:8px; }
    .storefront-products-grid { grid-template-columns:minmax(0,1fr); }
    .storefront-product-image { height:210px; }
    .auth-name-grid { grid-template-columns:minmax(0,1fr); gap:0; }
}

/* v5: current user chip opens shared dashboard */
a.account-chip, a.mobile-current-user { text-decoration: none; color: inherit; cursor: pointer; }
a.account-chip:hover, a.mobile-current-user:hover { color: #d75d1d; }
a.account-chip:focus-visible, a.mobile-current-user:focus-visible { outline: 2px solid #f26522; outline-offset: 3px; }
