/* SUNSIRI type system: Source Sans 3 for Latin, Noto Sans Sinhala for Sinhala
   shop/product text. Three Latin weights only - regular, semibold, bold - so
   the interface stays readable without downloading weights nothing uses. */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&family=Noto+Sans+Sinhala:wght@400;600&display=swap');

:root{
   /* Canonical GALLE brand navy - the exact computed colour of the storefront
      header's "All Categories" button (rgb(13,32,64)). Also declared, with the
      same value, in galle-theme.css (storefront pages do not load this file). */
   --galle-navy:#0D2040;
   --galle-navy-deep:#0A192F;
   --brand-primary:#303B8F;
   --brand-primary-hover:#222B70;
   --brand-primary-soft:#E8ECFF;
   --brand-primary-pale:#F4F6FF;
   --brand-dark:var(--galle-navy);
   --background-main:#F7F8FC;
   --background-soft:#F1F4FB;
   --surface:#FFFFFF;
   --surface-muted:#F6F7FA;
   --text-primary:#171B2E;
   --text-secondary:#667085;
   --border-color:#E4E7EC;
   --success:#15803D;
   --warning:#D97706;
   --danger:#D92D20;
   --brand-red:#E21B2D;
   --brand-red-dark:#B51224;
   --brand-navy:var(--brand-primary);
   --brand-navy-dark:var(--brand-dark);
   --brand-blue:var(--brand-primary);
   --brand-blue-soft:var(--brand-primary-soft);
   --surface-lowest:#ffffff;
   --surface-low:var(--surface-muted);
   --surface-container:var(--background-soft);
   --surface-high:#EEF0F6;
   --surface-highest:#E4E7EC;
   --text:var(--text-primary);
   --text-soft:#344054;
   --muted:var(--text-secondary);
   --outline:#98A2B3;
   --outline-soft:var(--border-color);
   --primary:var(--brand-primary);
   --primary-strong:var(--brand-primary);
   --primary-soft:var(--brand-primary-soft);
   --primary-soft-2:var(--brand-primary-pale);
   --secondary:var(--brand-primary);
   --secondary-strong:var(--brand-primary-hover);
   --secondary-soft:var(--brand-primary-soft);
   --error:var(--danger);
   --error-soft:#FEE2E2;
   --white:#ffffff;
   --container:1320px;
   --admin-sidebar:240px;
   --admin-topbar:64px;
   --radius-xs:4px;
   --radius-sm:8px;
   --radius:14px;
   --radius-lg:18px;
   --radius-xl:26px;
   --shadow-soft:0 6px 20px rgba(17,24,63,.055);
   --shadow-hover:0 16px 38px rgba(17,24,63,.1);
   --shadow-admin:0 12px 28px rgba(15,23,42,.12);
   --font-heading:"Source Sans 3","Noto Sans Sinhala","Segoe UI",Arial,sans-serif;
   --font-body:"Source Sans 3","Noto Sans Sinhala","Segoe UI",Arial,sans-serif;
}

*{
   box-sizing:border-box;
   margin:0;
   padding:0;
   border:0;
   outline:0;
   text-decoration:none;
   font-family:var(--font-body);
}

html{
   font-size:62.5%;
   overflow-x:hidden;
   scroll-behavior:smooth;
}

body{
   min-height:100vh;
   background:var(--surface);
   color:var(--text);
   font-size:16px;
   line-height:1.5;
}

img{display:block;max-width:100%}
button,input,select,textarea{font:inherit}
button[disabled],
input[disabled]{
   cursor:not-allowed!important;
   opacity:.72;
}

form.is-submitting{
   position:relative;
}

form.is-submitting::after{
   content:'';
   width:22px;
   height:22px;
   position:absolute;
   right:18px;
   bottom:18px;
   border:3px solid rgba(7,141,206,.18);
   border-top-color:var(--brand-red);
   border-radius:50%;
   animation:sunSpin .75s linear infinite;
   pointer-events:none;
}

.btn.is-loading,
.option-btn.is-loading,
.delete-btn.is-loading,
button.is-loading,
input.is-loading{
   filter:saturate(.9);
}

@keyframes sunSpin{
   to{transform:rotate(360deg)}
}

section{
   width:min(var(--container), calc(100% - 32px));
   margin-inline:auto;
   padding:48px 0;
}

.title{
   margin:0 0 24px;
   color:var(--text);
   font-family:var(--font-heading);
   font-size:clamp(2.4rem,2.7vw,4rem);
   font-weight:600;
   line-height:1.12;
   letter-spacing:-.02em;
   text-transform:none;
   text-align:left;
}

.eyebrow{
   display:inline-flex;
   align-items:center;
   gap:6px;
   margin-bottom:8px;
   color:var(--primary);
   font-size:1.2rem;
   font-weight:600;
   letter-spacing:.05em;
   text-transform:uppercase;
}

.section-head{
   display:flex;
   justify-content:space-between;
   align-items:flex-end;
   gap:20px;
   margin-bottom:24px;
}

.section-head .title{margin-bottom:0}
.section-head a{
   color:var(--primary);
   font-size:1.4rem;
   font-weight:700;
   text-decoration:underline;
   text-underline-offset:4px;
}

.btn,
.option-btn,
.delete-btn,
.view-btn,
.back-btn,
.see-more,
input[type="submit"],
button.view-btn{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   min-height:42px;
   padding:10px 18px;
   border-radius:var(--radius);
   font-size:1.4rem;
   font-weight:600;
   line-height:1;
   text-align:center;
   cursor:pointer;
   transition:background .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.btn,
input[type="submit"].btn{
   background:var(--primary-strong);
   color:var(--white);
   box-shadow:0 8px 18px rgba(226,27,45,.18);
}

.btn:hover,
input[type="submit"].btn:hover{
   background:var(--primary);
   transform:translateY(-1px);
}

.option-btn,
.view-btn,
.back-btn,
.see-more{
   border:1px solid var(--secondary-strong);
   background:var(--white);
   color:var(--secondary);
}

.option-btn:hover,
.view-btn:hover,
.back-btn:hover,
.see-more:hover{
   background:var(--secondary-soft);
   transform:translateY(-1px);
}

.delete-btn{
   border:1px solid var(--error-soft);
   background:var(--white);
   color:var(--error);
}

.delete-btn:hover{
   background:#fff1f2;
   transform:translateY(-1px);
}

.disabled{
   pointer-events:none;
   opacity:.45;
}

.flex-btn{
   display:flex;
   gap:10px;
   align-items:center;
}

.flex-btn > *{flex:1}

.message{
   position:sticky;
   top:12px;
   z-index:3000;
   width:min(var(--container), calc(100% - 32px));
   margin:12px auto;
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:14px;
   padding:12px 14px;
   border:1px solid var(--surface-highest);
   border-left:4px solid var(--primary-strong);
   border-radius:var(--radius);
   background:var(--white);
   color:var(--text);
   box-shadow:var(--shadow-soft);
   font-size:1.4rem;
   animation:sunFadeUp .24s ease both;
   transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.message i{
   color:var(--error);
   font-size:1.8rem;
   cursor:pointer;
}

.empty{
   grid-column:1/-1;
   width:100%;
   padding:28px;
   border:1px dashed var(--surface-highest);
   border-radius:var(--radius-lg);
   background:var(--white);
   color:var(--muted);
   font-size:1.5rem;
   text-align:center;
   text-transform:none;
   animation:sunFadeUp .24s ease both;
}

.box,
input.box,
select.box,
textarea.box{
   width:100%;
   min-height:44px;
   padding:0 14px;
   border:1px solid #cbd5e1;
   border-radius:var(--radius);
   background:#f9fafb;
   color:var(--text);
   font-size:1.45rem;
}

textarea.box,
textarea{
   min-height:120px;
   padding:12px 14px;
   resize:vertical;
}

.box:focus,
input:focus,
select:focus,
textarea:focus{
   border-color:var(--primary-strong)!important;
   box-shadow:0 0 0 3px rgba(7,141,206,.16);
}

.card-surface{
   border:1px solid #e5e7eb;
   border-radius:var(--radius-lg);
   background:var(--white);
   box-shadow:var(--shadow-soft);
}

/* Customer marketplace header */
.site-header{
   position:sticky;
   top:0;
   z-index:1000;
   border-bottom:1px solid #e5e7eb;
   background:rgba(255,255,255,.92);
   backdrop-filter:blur(12px);
}

.site-header .flex{
   position:relative;
   width:min(var(--container), calc(100% - 32px));
   min-height:76px;
   margin:0 auto;
   display:grid;
   grid-template-columns:auto auto minmax(260px,1fr) auto;
   gap:18px;
   align-items:center;
}

.logo{
   display:inline-flex;
   align-items:center;
   gap:10px;
   color:var(--text);
   font-family:var(--font-heading);
   font-size:2.35rem;
   font-weight:600;
   letter-spacing:-.02em;
   white-space:nowrap;
}

.logo i{
   width:40px;
   height:40px;
   display:inline-grid;
   place-items:center;
   border-radius:14px;
   background:var(--brand-navy);
   color:var(--white);
   font-size:1.75rem;
}

.logo span{color:var(--brand-red)}

.navbar{
   display:flex;
   align-items:center;
   justify-content:center;
   gap:4px;
}

.navbar a{
   padding:9px 11px;
   border-radius:999px;
   color:var(--text-soft);
   font-size:1.4rem;
   font-weight:700;
   text-transform:capitalize;
   white-space:nowrap;
}

.navbar a:hover{
   background:var(--surface-low);
   color:var(--primary);
}

.search-wrapper{
   position:relative;
   width:100%;
}

.search-wrapper input{
   width:100%;
   height:46px;
   padding:0 48px 0 18px;
   border:1px solid #e5e7eb;
   border-radius:var(--radius);
   background:var(--surface-low);
   color:var(--text);
   font-size:1.42rem;
}

.search-icon{
   position:absolute;
   right:17px;
   top:50%;
   transform:translateY(-50%);
   color:var(--primary);
   font-size:1.6rem;
   pointer-events:none;
}

#suggestions{
   position:absolute;
   left:0;
   right:0;
   top:calc(100% + 8px);
   z-index:1005;
   display:none;
   max-height:320px;
   overflow:auto;
   border:1px solid #e5e7eb;
   border-radius:var(--radius-lg);
   background:var(--white);
   box-shadow:var(--shadow-hover);
}

/* The search page's own dropdown (search_page.php) sits in normal document
   flow below the input, not as an absolutely-positioned overlay like the
   header's - only the height cap/scroll behavior is shared. Without a
   max-height, a long suggestion list pushed the results section below it
   as far down the page as the list was tall. */
#search-page-suggestions{
   max-height:320px;
   overflow-y:auto;
   overflow-x:hidden;
   border-radius:var(--radius-lg);
}

.suggestion-item{
   display:flex;
   align-items:center;
   gap:12px;
   padding:10px 12px;
   border-bottom:1px solid #f1f5f9;
   color:var(--text);
   font-size:1.4rem;
}

.suggestion-item img{
   width:42px;
   height:42px;
   border-radius:var(--radius);
   object-fit:cover;
   background:var(--surface-low);
}

.suggestion-item:hover,
.suggestion-item.active{
   background:var(--primary-soft-2);
}

.icons{
   display:flex;
   align-items:center;
   justify-content:flex-end;
   gap:9px;
}

.header-logout-form{
   margin:0;
   display:inline-flex;
}

.icons a:not(.logout-btn),
.icons #menu-btn,
.icons #user-btn,
#menu-btn{
   width:42px;
   height:42px;
   display:inline-flex;
   align-items:center;
   justify-content:center;
   border:1px solid #e5e7eb;
   border-radius:var(--radius);
   background:var(--white);
   color:var(--text);
   font-size:1.55rem;
   cursor:pointer;
}

.icons a:not(.logout-btn):hover,
.icons #menu-btn:hover,
.icons #user-btn:hover,
#menu-btn:hover{
   border-color:var(--outline-soft);
   color:var(--brand-red);
   background:var(--brand-blue-soft);
}

#menu-btn{display:none}

.logout-btn{
   min-height:42px;
   padding:0 15px;
   border-radius:var(--radius);
   border:1px solid var(--outline-soft);
   background:var(--white);
   color:var(--secondary);
   font-size:1.3rem;
   font-weight:600;
   display:inline-flex;
   align-items:center;
   justify-content:center;
   gap:8px;
   cursor:pointer;
}

.logout-btn:hover{
   border-color:rgba(226,27,45,.24);
   background:var(--primary-soft-2);
   color:var(--brand-red);
}

.header .flex .profile{
   position:absolute;
   top:calc(100% + 10px);
   right:0;
   z-index:1006;
   width:292px;
   display:none;
   padding:18px;
   border:1px solid #e5e7eb;
   border-radius:var(--radius-lg);
   background:var(--white);
   box-shadow:var(--shadow-hover);
   text-align:center;
}

.header .flex .profile.active{display:block}

.header .flex .profile img{
   width:76px;
   height:76px;
   margin:0 auto 10px;
   border-radius:50%;
   object-fit:cover;
   background:var(--surface-low);
}

.header .flex .profile p{
   margin-bottom:12px;
   color:var(--text);
   font-weight:600;
}

/* Marketplace footer */
.footer{
   margin-top:56px;
   border-top:1px solid #e5e7eb;
   background:var(--white);
}

.footer .box-container{
   width:min(var(--container), calc(100% - 32px));
   margin:0 auto;
   padding:40px 0 26px;
   display:grid;
   grid-template-columns:1.4fr repeat(3,1fr);
   gap:28px;
}

.footer .box h3{
   margin-bottom:12px;
   color:var(--text);
   font-family:var(--font-heading);
   font-size:1.6rem;
   font-weight:600;
   text-transform:none;
}

.footer .footer-brand h3{
   color:var(--primary);
   font-size:2.4rem;
}

.footer .box p,
.footer .box a{
   display:block;
   padding:5px 0;
   color:var(--muted);
   font-size:1.4rem;
}

.footer .box i{
   width:18px;
   color:var(--secondary);
}

.footer .box a:hover{color:var(--primary)}

.footer .credit{
   margin:0;
   padding:15px;
   border-top:1px solid #f1f5f9;
   color:var(--muted);
   font-size:1.3rem;
   text-align:center;
}

.footer .credit span{
   color:var(--primary);
   font-weight:600;
}

/* Auth screens */
.auth-page,
.admin-login-page{
   min-height:100vh;
   background:
      radial-gradient(circle at 14% 18%, rgba(226,27,45,.12), transparent 28%),
      radial-gradient(circle at 88% 12%, rgba(7,141,206,.12), transparent 26%),
      var(--surface);
}

.auth-shell{
   position:relative;
   min-height:100vh;
   display:grid;
   place-items:center;
   padding:96px 20px 88px;
   background:
      radial-gradient(circle at 8% 82%, rgba(7,141,206,.11), transparent 26%),
      radial-gradient(circle at 86% 18%, rgba(226,27,45,.12), transparent 28%),
      linear-gradient(135deg,#fff 0%,#fff 58%,#eef8ff 100%);
}

.auth-shell::before{
   content:"Sun Super";
   position:absolute;
   left:clamp(24px,5vw,72px);
   top:28px;
   color:var(--primary);
   font-family:var(--font-heading);
   font-size:2.2rem;
   font-weight:600;
}

.auth-shell::after{
   content:"Secure   Organic   Encrypted";
   position:absolute;
   left:50%;
   bottom:44px;
   transform:translateX(-50%);
   color:var(--muted);
   font-size:1.25rem;
   font-weight:600;
   letter-spacing:.06em;
   word-spacing:18px;
}

.auth-visual{
   display:none;
}

.auth-brand{
   display:inline-flex;
   align-items:center;
   gap:10px;
   width:max-content;
   color:var(--text);
   font-family:var(--font-heading);
   font-size:2.2rem;
   font-weight:600;
}

.auth-brand i{
   width:42px;
   height:42px;
   display:inline-grid;
   place-items:center;
   border-radius:14px;
   background:var(--brand-navy);
   color:var(--white);
}

.auth-brand span{color:var(--brand-red)}

.auth-copy{
   max-width:620px;
   padding:26px;
   border:1px solid rgba(255,255,255,.7);
   border-radius:var(--radius-xl);
   background:rgba(255,255,255,.72);
   backdrop-filter:blur(10px);
}

.auth-copy .eyebrow{margin-bottom:12px}
.auth-copy h1{
   margin-bottom:14px;
   color:var(--text);
   font-family:var(--font-heading);
   font-size:clamp(3.2rem,4vw,5rem);
   line-height:1.06;
   letter-spacing:-.02em;
}

.auth-copy p{
   color:var(--text-soft);
   font-size:1.7rem;
   max-width:520px;
}

.auth-points{
   display:flex;
   flex-wrap:wrap;
   gap:10px;
   margin-top:20px;
}

.auth-points span{
   display:inline-flex;
   align-items:center;
   gap:7px;
   padding:8px 11px;
   border-radius:999px;
   background:var(--white);
   color:var(--secondary);
   font-size:1.3rem;
   font-weight:600;
}

.form-container{
   width:100%;
   min-height:auto;
   display:flex;
   align-items:center;
   justify-content:center;
   padding:0;
}

.form-container form{
   width:min(430px,100%);
   padding:36px 32px;
   border:1px solid #e5e7eb;
   border-radius:18px;
   background:rgba(255,255,255,.96);
   box-shadow:var(--shadow-soft);
   text-align:center;
}

.form-container form h2,
.form-container form h3{
   margin-bottom:8px;
   color:var(--text);
   font-family:var(--font-heading);
   font-size:2.8rem;
   font-weight:600;
   letter-spacing:-.02em;
   text-transform:none;
}

.form-container form .form-subtitle{
   margin:0 0 18px;
   color:var(--muted);
   font-size:1.45rem;
}

.form-container form .box{
   margin:8px 0;
   text-align:left;
}

.form-container form .btn{
   width:100%;
   min-height:48px;
   margin-top:12px;
   border-radius:12px;
   font-size:1.55rem;
}

.form-container form p{
   margin-top:16px;
   color:var(--muted);
   font-size:1.4rem;
   text-align:center;
}

.form-container form p a{
   color:var(--primary);
   font-weight:600;
}

.admin-login-page .auth-shell{
   background:
      radial-gradient(circle at 8% 82%, rgba(226,27,45,.11), transparent 26%),
      radial-gradient(circle at 88% 12%, rgba(7,141,206,.10), transparent 30%),
      #fff;
}

.admin-login-page .auth-shell::before{
   content:"Sun Super Admin";
}

/* Admin shell primitives */
.admin-header{
   position:relative;
   z-index:1200;
   background:transparent;
}

.admin-header .flex{
   display:block;
}

.admin-header .admin-sidebar{
   position:fixed;
   inset:0 auto 0 0;
   z-index:1300;
   width:var(--admin-sidebar);
   display:flex;
   flex-direction:column;
   gap:16px;
   padding:16px;
   border-right:1px solid var(--surface-highest);
   background:var(--white);
}

.admin-header .admin-sidebar .logo{
   padding:8px 4px 14px;
   font-size:2rem;
}

.admin-header .navbar{
   display:grid;
   gap:5px;
   align-content:start;
}

.admin-header .navbar a{
   position:relative;
   display:flex;
   align-items:center;
   gap:10px;
   justify-content:flex-start;
   padding:11px 12px 11px 16px;
   border-radius:var(--radius-sm);
   color:var(--muted);
   font-family:var(--font-heading);
   font-size:1.38rem;
   font-weight:700;
}

.admin-header .navbar a i{
   width:1.8rem;
   flex:0 0 1.8rem;
   text-align:center;
   color:currentColor;
}

.admin-header .navbar a.active{
   background:var(--secondary-soft);
   color:var(--secondary);
}

.admin-header .navbar a.active::before{
   content:"";
   position:absolute;
   left:0;
   top:9px;
   bottom:9px;
   width:4px;
   border-radius:999px;
   background:var(--primary-strong);
}

.admin-header .navbar a:hover{
   background:var(--secondary-soft);
   color:var(--secondary);
}

.admin-header .navbar a:hover::before{
   content:"";
   position:absolute;
   left:0;
   top:9px;
   bottom:9px;
   width:4px;
   border-radius:999px;
   background:var(--primary-strong);
}

.admin-topbar{
   position:fixed;
   top:0;
   right:0;
   left:var(--admin-sidebar);
   z-index:1250;
   height:var(--admin-topbar);
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:16px;
   padding:0 28px;
   border-bottom:1px solid var(--surface-highest);
   background:rgba(255,255,255,.9);
   backdrop-filter:blur(12px);
}

.admin-topbar .topbar-title{
   display:grid;
   gap:1px;
}

.admin-topbar .topbar-title strong{
   color:var(--text);
   font-family:var(--font-heading);
   font-size:1.8rem;
}

.admin-topbar .topbar-title span{
   color:var(--muted);
   font-size:1.25rem;
}

.admin-header .icons{
   justify-content:flex-end;
}

.admin-header .flex .profile{
   position:fixed;
   top:calc(var(--admin-topbar) + 10px);
   right:24px;
}

body:has(.admin-header){
   background:#f7f9fb;
}

.admin-header ~ section,
.admin-header ~ .dashboard,
.admin-header ~ .add-products,
.admin-header ~ .show-products,
.admin-header ~ .placed-orders,
.admin-header ~ .user-accounts,
.admin-header ~ .messages,
.admin-header ~ .update-product,
.admin-header ~ .admin-reviews{
   margin-left:calc(var(--admin-sidebar) + 32px);
   margin-right:32px;
   width:auto;
   padding-top:calc(var(--admin-topbar) + 28px);
}

@media (max-width:1080px){
   #menu-btn{display:inline-flex}

   .site-header .flex{
      grid-template-columns:auto 1fr auto;
      min-height:72px;
   }

   .site-header .navbar{
      position:absolute;
      top:calc(100% + 8px);
      left:0;
      right:0;
      z-index:1004;
      display:grid;
      grid-template-columns:repeat(2,minmax(0,1fr));
      gap:6px;
      padding:12px;
      border:1px solid #e5e7eb;
      border-radius:var(--radius-lg);
      background:var(--white);
      box-shadow:var(--shadow-hover);
      clip-path:inset(0 0 100% 0);
      transition:clip-path .18s ease;
   }

   .site-header .navbar.active{clip-path:inset(0)}
   .site-header .search-wrapper{
      grid-column:1/-1;
      grid-row:2;
   }

   .auth-shell,
   .admin-login-page .auth-shell{
      grid-template-columns:1fr;
   }

   .admin-login-page .auth-visual{
      order:0;
   }

   .auth-visual{
      min-height:360px;
   }

   .admin-header .admin-sidebar{
      transform:translateX(-105%);
      transition:transform .18s ease;
      box-shadow:var(--shadow-admin);
   }

   .admin-header .navbar.active{
      transform:translateX(0);
   }

   .admin-topbar{
      left:0;
      padding:0 16px;
   }

   .admin-header ~ section,
   .admin-header ~ .dashboard,
   .admin-header ~ .add-products,
   .admin-header ~ .show-products,
   .admin-header ~ .placed-orders,
   .admin-header ~ .user-accounts,
   .admin-header ~ .messages,
   .admin-header ~ .update-product,
   .admin-header ~ .admin-reviews{
      margin-left:auto;
      margin-right:auto;
      width:min(var(--container), calc(100% - 32px));
   }
}

/* UI rescue layer: premium grocery baseline */
:root{
   --surface:#F8FAFC;
   --surface-low:#f3f7fd;
   --surface-highest:#E4E7EC;
   --text:#1D2433;
   --text-soft:#344054;
   --muted:#667085;
   --primary:#B51224;
   --primary-strong:#E21B2D;
   --primary-soft:#FDECEF;
   --secondary:#17245A;
   --secondary-strong:#078DCE;
   --secondary-soft:#EAF6FF;
   --radius:14px;
   --radius-lg:18px;
   --radius-xl:26px;
   --shadow-soft:0 10px 28px rgba(23,36,90,.06);
   --shadow-hover:0 18px 44px rgba(23,36,90,.12);
}

body{
   background:var(--surface);
   color:var(--text);
   -webkit-font-smoothing:antialiased;
}

section{
   padding:40px 0;
}

.title{
   margin-bottom:18px;
   font-size:clamp(2.3rem,2.4vw,3.4rem);
   letter-spacing:-.035em;
}

.eyebrow{
   color:var(--brand-primary);
   font-size:1.15rem;
   letter-spacing:.06em;
}

.btn,
.option-btn,
.delete-btn,
.view-btn,
.back-btn,
.see-more,
input[type="submit"],
button.view-btn{
   min-height:40px;
   border-radius:12px;
   font-size:1.32rem;
   box-shadow:none;
}

.btn,
input[type="submit"].btn{
   background:var(--primary-strong);
   color:#fff;
   box-shadow:0 10px 20px rgba(226,27,45,.16);
}

.option-btn,
.view-btn,
.back-btn,
.see-more{
   border-color:#b7d7ee;
   background:#fff;
   color:var(--secondary);
}

.box,
input.box,
select.box,
textarea.box{
   min-height:42px;
   border-color:#d7dfd8;
   border-radius:12px;
   background:#fff;
   font-size:1.38rem;
}

.site-header{
   border-bottom:1px solid rgba(23,32,26,.08);
   background:rgba(255,255,255,.94);
}

.site-header .flex{
   min-height:68px;
   gap:14px;
   grid-template-columns:auto auto minmax(300px,1fr) auto;
}

.logo{
   font-size:2.1rem;
}

.logo i{
   width:38px;
   height:38px;
   border-radius:13px;
}

.navbar a{
   padding:8px 10px;
   color:#3e493f;
   font-size:1.32rem;
}

.search-wrapper input{
   height:44px;
   border-color:#dfe5dc;
   border-radius:14px;
   background:#f5f6f3;
}

.icons a:not(.logout-btn),
.icons #menu-btn,
.icons #user-btn,
#menu-btn{
   width:40px;
   height:40px;
   border-color:#e4e9e1;
   border-radius:13px;
}

.logout-btn{
   min-height:40px;
   border-radius:13px;
   background:#17201a;
}

.footer{
   margin-top:42px;
   border-top:1px solid rgba(23,32,26,.08);
   background:#fff;
}

.footer .box-container{
   padding:32px 0 22px;
   gap:22px;
}

.footer .box{
   padding:16px;
   border:1px solid #e1e7df;
   border-radius:16px;
   background:#fbfcfa;
}

.footer .box h3{
   font-size:1.45rem;
}

.footer .footer-brand h3{
   font-size:2.1rem;
}

.auth-shell{
   min-height:100vh;
   padding:90px 20px 78px;
   background:
      radial-gradient(circle at 8% 82%, rgba(7,141,206,.12), transparent 25%),
      radial-gradient(circle at 88% 14%, rgba(226,27,45,.13), transparent 26%),
      linear-gradient(135deg,#fff 0%,#fff7f8 55%,#eef8ff 100%);
}

.auth-shell::after{
   bottom:34px;
}

.form-container form{
   width:min(390px,100%);
   padding:30px;
   border-color:#e1e7df;
   border-radius:22px;
   box-shadow:0 18px 50px rgba(23,32,26,.08);
}

.form-container form h2,
.form-container form h3{
   font-size:2.55rem;
}

.form-container form .form-subtitle{
   margin-bottom:20px;
}

@media (max-width:1080px){
   .site-header .flex{
      grid-template-columns:auto 1fr auto;
   }
}

/* Reference refinement layer: shared storefront/admin shell */
:root{
   --surface:#F8FAFC;
   --surface-low:#f3f7fd;
   --surface-container:#eef4fb;
   --surface-highest:#E4E7EC;
   --text:#1D2433;
   --text-soft:#344054;
   --muted:#667085;
   --primary:#B51224;
   --primary-strong:#E21B2D;
   --primary-soft:#FDECEF;
   --primary-soft-2:#FFF5F6;
   --secondary:#17245A;
   --secondary-strong:#078DCE;
   --secondary-soft:#EAF6FF;
   --outline:#D0D5DD;
   --outline-soft:#E4E7EC;
   --radius:14px;
   --radius-lg:18px;
   --radius-xl:28px;
   --shadow-soft:0 12px 34px rgba(23,36,90,.06);
   --shadow-hover:0 20px 48px rgba(23,36,90,.11);
   --font-heading:"Source Sans 3","Noto Sans Sinhala","Segoe UI",Arial,sans-serif;
   --font-body:"Source Sans 3","Noto Sans Sinhala","Segoe UI",Arial,sans-serif;
}

body{
   background:var(--surface);
   color:var(--text);
}

section{
   width:min(var(--container), calc(100% - 40px));
   padding:44px 0;
}

.title{
   color:var(--text);
   font-family:var(--font-heading);
   font-size:clamp(2.35rem,2.25vw,3.55rem);
   letter-spacing:-.035em;
}

.btn,
.option-btn,
.delete-btn,
.view-btn,
.back-btn,
.see-more,
input[type="submit"],
button.view-btn{
   min-height:40px;
   border-radius:999px;
   padding:10px 17px;
   font-size:1.34rem;
   box-shadow:none;
}

.btn,
input[type="submit"].btn{
   background:var(--primary);
   color:#fff;
   box-shadow:0 10px 22px rgba(226,27,45,.18);
}

.btn:hover,
input[type="submit"].btn:hover{
   background:var(--brand-red-dark);
   transform:translateY(-1px);
}

.option-btn,
.view-btn,
.back-btn,
.see-more{
   border:1px solid #cfe8d6;
   background:#fff;
   color:var(--secondary);
}

.delete-btn{
   background:#fee2e2;
   color:#b91c1c;
}

.box,
input.box,
select.box,
textarea.box{
   min-height:42px;
   border:1px solid #dde3dc;
   border-radius:12px;
   background:#fff;
   color:var(--text);
   font-size:1.35rem;
}

.message{
   border:1px solid #dbe7dc;
   border-radius:16px;
   background:#fff;
   box-shadow:0 14px 36px rgba(31,41,51,.09);
}

.site-header{
   position:sticky;
   top:0;
   z-index:1000;
   border-bottom:1px solid rgba(31,41,51,.08);
   background:rgba(255,255,255,.94);
   backdrop-filter:blur(18px);
}

.site-header .flex{
   min-height:78px;
   gap:18px;
   grid-template-columns:auto auto minmax(360px,1fr) auto;
}

.logo{
   color:var(--text);
   font-size:2.25rem;
   letter-spacing:-.035em;
}

.logo i{
   width:42px;
   height:42px;
   border-radius:15px;
   background:var(--brand-navy);
   color:#fff;
}

.logo img{
   width:42px;
   height:42px;
   border-radius:14px;
   object-fit:cover;
   background:#fff;
}

.navbar{
   gap:4px;
}

.navbar a{
   padding:9px 12px;
   border-radius:999px;
   color:#4b5563;
   font-size:1.36rem;
   font-weight:700;
}

.navbar a:hover{
   background:var(--secondary-soft);
   color:var(--secondary);
}

.search-wrapper{
   max-width:520px;
   margin-inline:auto;
}

.search-wrapper input{
   height:46px;
   border:1px solid #dde3dc;
   border-radius:999px;
   background:#f8faf7;
   box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

.icons{
   gap:8px;
}

.icons a:not(.logout-btn),
.icons #menu-btn,
.icons #user-btn,
#menu-btn{
   width:42px;
   height:42px;
   border:1px solid #e5e7eb;
   border-radius:50%;
   background:#fff;
}

.logout-btn{
   min-height:38px;
   display:inline-flex;
   align-items:center;
   gap:7px;
   padding:0 12px;
   border-radius:999px;
   border:1px solid #e5e7eb;
   background:#fff;
   color:var(--text);
   font-size:1.25rem;
   font-weight:600;
   box-shadow:none;
}

.logout-btn:hover{
   border-color:rgba(226,27,45,.2);
   background:var(--primary-soft-2);
   color:var(--brand-red);
}

.logout-btn i{
   font-size:1.35rem;
}

.footer{
   margin-top:44px;
   border-top:1px solid rgba(31,41,51,.08);
   background:#fff;
}

.footer .box-container{
   padding:34px 0 22px;
   grid-template-columns:1.3fr repeat(3,minmax(160px,1fr));
   gap:20px;
}

.footer .box{
   padding:0;
   border:0;
   border-radius:0;
   background:transparent;
   box-shadow:none;
}

.footer .box h3,
.footer .footer-brand h3{
   color:var(--text);
   font-size:1.55rem;
   letter-spacing:-.02em;
}

.footer .footer-brand h3{
   font-size:2.05rem;
}

.footer .box a,
.footer .box p{
   color:var(--muted);
   font-size:1.32rem;
}

.auth-page,
.admin-login-page{
   background:
      radial-gradient(circle at 12% 18%, rgba(7,141,206,.13), transparent 28%),
      radial-gradient(circle at 88% 12%, rgba(226,27,45,.13), transparent 30%),
      #f8fbff;
}

.auth-shell{
   min-height:100vh;
   display:grid;
   grid-template-columns:minmax(0,1fr) minmax(360px,480px);
   gap:42px;
   align-items:center;
   width:min(1120px, calc(100% - 40px));
   margin:0 auto;
   padding:58px 0;
   background:transparent;
}

.auth-shell::before,
.auth-shell::after{
   display:none;
}

.auth-visual{
   display:grid;
   gap:28px;
   min-height:560px;
   align-content:space-between;
   padding:34px;
   border:1px solid rgba(255,255,255,.78);
   border-radius:34px;
   background:
      linear-gradient(145deg,rgba(255,255,255,.9),rgba(255,245,246,.74)),
      radial-gradient(circle at 78% 72%, rgba(7,141,206,.16), transparent 34%);
   box-shadow:0 24px 70px rgba(23,36,90,.10);
   overflow:hidden;
   position:relative;
}

.auth-visual::after{
   content:"";
   position:absolute;
   right:-70px;
   bottom:-70px;
   width:260px;
   height:260px;
   border-radius:50%;
   background:rgba(7,141,206,.12);
}

.auth-brand{
   position:relative;
   z-index:1;
   font-size:2.4rem;
   letter-spacing:-.04em;
}

.auth-brand i{
   background:var(--brand-navy);
   color:#fff;
}

.auth-brand span{
   color:var(--brand-red);
}

.auth-copy{
   position:relative;
   z-index:1;
   max-width:650px;
   padding:0;
   border:0;
   border-radius:0;
   background:transparent;
   backdrop-filter:none;
}

.auth-copy h1{
   max-width:620px;
   font-size:clamp(4.3rem,5vw,6.7rem);
   line-height:.98;
   letter-spacing:-.06em;
}

.auth-copy p{
   color:var(--muted);
   font-size:1.65rem;
}

.auth-points span{
   border:1px solid rgba(7,141,206,.16);
   background:#fff;
}

.form-container{
   justify-content:flex-end;
}

.form-container form{
   width:min(440px,100%);
   padding:34px;
   border:1px solid rgba(229,231,235,.9);
   border-radius:28px;
   background:rgba(255,255,255,.96);
   box-shadow:0 22px 60px rgba(31,41,51,.11);
   text-align:left;
}

.form-container form h2,
.form-container form h3{
   font-size:3rem;
   letter-spacing:-.045em;
}

.form-container form .form-subtitle{
   font-size:1.45rem;
   line-height:1.55;
}

.form-container form .box{
   width:100%;
   min-height:48px;
   margin:9px 0;
   padding:0 15px;
   border-radius:14px;
}

.form-container form .btn{
   min-height:48px;
   margin-top:12px;
   border-radius:999px;
}

.form-container form p{
   text-align:left;
}

.auth-form-head{
   display:grid;
   gap:4px;
   margin-bottom:18px;
}

.auth-field-stack{
   display:grid;
   gap:12px;
}

.auth-field-stack label{
   display:grid;
   gap:7px;
   color:var(--text);
   font-size:1.3rem;
   font-weight:600;
}

.auth-field-stack label span{
   color:var(--text-soft);
}

.admin-login-page .auth-shell{
   grid-template-columns:minmax(380px,470px) minmax(0,1fr);
}

.admin-login-page .form-container{
   justify-content:flex-start;
}

.admin-login-page .auth-visual{
   background:
      linear-gradient(145deg,rgba(255,255,255,.92),rgba(234,246,255,.82)),
      radial-gradient(circle at 80% 70%, rgba(226,27,45,.12), transparent 34%);
}

.admin-header .admin-sidebar{
   border-right:1px solid #e5e7eb;
   background:#fff;
}

.admin-header .navbar a{
   border-radius:12px;
}

.admin-header .navbar a:hover{
   background:#f0fdf4;
   color:var(--secondary);
}

.admin-topbar{
   border-bottom:1px solid #e5e7eb;
   background:rgba(255,255,255,.94);
   backdrop-filter:blur(16px);
}

@media (max-width:1080px){
   .site-header .flex{
      min-height:72px;
      grid-template-columns:auto 1fr auto;
   }

   .auth-shell,
   .admin-login-page .auth-shell{
      grid-template-columns:1fr;
      gap:22px;
      padding:34px 0;
   }

   .auth-visual{
      min-height:auto;
      padding:28px;
   }

   .form-container,
   .admin-login-page .form-container{
      justify-content:center;
   }
}

/* Final responsive polish layer */
*,
*::before,
*::after{
   min-width:0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible{
   outline:3px solid rgba(22,163,74,.32);
   outline-offset:3px;
}

input,
select,
textarea,
button{
   max-width:100%;
}

.btn,
.option-btn,
.delete-btn,
.view-btn,
.back-btn,
button,
input[type="submit"]{
   min-height:44px;
   touch-action:manipulation;
}

.site-header .logo{
   overflow:hidden;
   text-overflow:ellipsis;
}

.site-header .icons{
   flex-wrap:nowrap;
}

.site-header .icons a,
.site-header #menu-btn{
   flex:0 0 auto;
}

.site-header .navbar a{
   min-height:42px;
   display:inline-flex;
   align-items:center;
   justify-content:center;
}

.form-container form p a{
   min-height:34px;
   display:inline-flex;
   align-items:center;
}

#suggestions,
#search-page-suggestions{
   overscroll-behavior:contain;
}

@media (max-width:1024px){
   .site-header .flex{
      grid-template-columns:auto 1fr auto;
      gap:12px;
      min-height:auto;
      padding:10px 0;
   }

   #menu-btn{
      display:inline-flex;
      justify-self:end;
   }

   .site-header .navbar{
      position:absolute;
      left:0;
      right:0;
      top:calc(100% + 8px);
      z-index:1010;
      display:grid;
      grid-template-columns:repeat(2,minmax(0,1fr));
      gap:8px;
      padding:12px;
      border:1px solid #e5e7eb;
      border-radius:18px;
      background:#fff;
      box-shadow:0 18px 48px rgba(15,23,42,.14);
      clip-path:inset(0 0 100% 0);
      pointer-events:none;
      transition:clip-path .18s ease;
   }

   .site-header .navbar.active{
      clip-path:inset(0);
      pointer-events:auto;
   }

   .site-header .navbar a{
      min-height:42px;
      display:flex;
      align-items:center;
      justify-content:center;
      border-radius:12px;
      background:#f8fafc;
   }

   .site-header .search-wrapper{
      order:4;
      grid-column:1 / -1;
   }
}

@keyframes sunFadeUp{
   from{
      opacity:0;
      transform:translate3d(0,10px,0);
   }
   to{
      opacity:1;
      transform:translate3d(0,0,0);
   }
}

@keyframes sunPop{
   from{
      opacity:0;
      transform:scale(.98);
   }
   to{
      opacity:1;
      transform:scale(1);
   }
}

body.page-ready .footer .box-container,
body.page-ready .auth-shell,
body.page-ready .admin-topbar,
body.page-ready .admin-header .admin-sidebar,
body.page-ready .store-hero,
body.page-ready .page-hero,
body.page-ready .commerce-hero,
body.page-ready .section-head,
body.page-ready .trust-strip,
body.page-ready .home-category .box-container,
body.page-ready .products .box-container,
body.page-ready .shopping-cart .box-container,
body.page-ready .wishlist .box-container,
body.page-ready .display-orders,
body.page-ready .checkout-layout,
body.page-ready .checkout-orders form,
body.page-ready .update-profile form,
body.page-ready .contact-layout,
body.page-ready .contact-layout form,
body.page-ready .contact-info-card,
body.page-ready .reviews .box-container,
body.page-ready .review-form,
body.page-ready .dashboard .box-container,
body.page-ready .show-products .box-container,
body.page-ready .placed-orders .box-container,
body.page-ready .user-accounts .box-container,
body.page-ready .messages .box-container,
body.page-ready .admin-reviews table,
body.page-ready .order-box,
body.page-ready .shop-settings-form,
body.page-ready .modal-content{
   animation:sunFadeUp .34s cubic-bezier(.2,.8,.2,1) both;
}

body.page-ready .products .box,
body.page-ready .home-category .box,
body.page-ready .trust-card,
body.page-ready .promo-card,
body.page-ready .shopping-cart .box,
body.page-ready .wishlist .box,
body.page-ready .placed-orders .box,
body.page-ready .dashboard .box,
body.page-ready .show-products .box,
body.page-ready .user-accounts .box,
body.page-ready .messages .box,
body.page-ready .about .box,
body.page-ready .category-card,
body.page-ready .cart-item-card,
body.page-ready .order-card,
body.page-ready .admin-order-card{
   animation:sunPop .32s cubic-bezier(.2,.8,.2,1) both;
}

.site-header .flex,
.footer .box-container,
.auth-shell,
.admin-topbar,
.admin-header .admin-sidebar,
.store-hero,
.page-hero,
.commerce-hero,
.section-head,
.trust-strip,
.home-category .box-container,
.products .box-container,
.shopping-cart .box-container,
.wishlist .box-container,
.display-orders,
.checkout-layout,
.checkout-orders form,
.update-profile form,
.contact-layout,
.contact-layout form,
.contact-info-card,
.reviews .box-container,
.review-form,
.dashboard .box-container,
.show-products .box-container,
.placed-orders .box-container,
.user-accounts .box-container,
.messages .box-container,
.admin-reviews table,
.order-box,
.shop-settings-form,
.modal-content,
.products .box,
.home-category .box,
.trust-card,
.promo-card,
.shopping-cart .box,
.wishlist .box,
.placed-orders .box,
.dashboard .box,
.show-products .box,
.user-accounts .box,
.messages .box,
.about .box,
.category-card,
.cart-item-card,
.order-card,
.admin-order-card{
   transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
   will-change:transform, opacity;
}

.btn:active,
.option-btn:active,
.delete-btn:active,
.view-btn:active,
.back-btn:active,
.see-more:active,
input[type="submit"]:active,
button:active{
   transform:translateY(1px) scale(.99);
}

body.page-leaving{
   opacity:.99;
   transition:opacity .14s ease;
}

body.page-leaving .site-header .flex,
body.page-leaving section,
body.page-leaving .footer .box-container,
body.page-leaving .auth-shell,
body.page-leaving .admin-topbar,
body.page-leaving .admin-header .admin-sidebar{
   transform:translate3d(0,2px,0);
   opacity:.96;
}

.sr-only{
   position:absolute;
   width:1px;
   height:1px;
   padding:0;
   margin:-1px;
   overflow:hidden;
   clip:rect(0,0,0,0);
   white-space:nowrap;
   border:0;
}

.brand-logo-image{
   display:block;
   width:auto;
   max-width:100%;
   object-fit:contain;
   background:transparent!important;
}

.site-header .logo{
   gap:12px;
}

.site-header .customer-brand-logo{
   height:auto;
   max-height:48px;
   width:auto;
   max-width:220px;
   border-radius:0;
   box-shadow:none;
}

.footer-brand-logo{
   width:auto;
   max-width:220px;
   max-height:72px;
   margin-bottom:14px;
   object-fit:contain;
}

.auth-brand{
   display:inline-flex;
   align-items:center;
   gap:14px;
   width:max-content;
}

.auth-brand-image{
   width:auto;
   max-width:220px;
   max-height:72px;
}

/* The customer access mark is portrait-oriented, so give it room to read. */
.customer-login-page .auth-brand{
   display:block;
   width:min(100%, 190px);
   margin:0;
}

.customer-login-page .auth-brand-image{
   display:block;
   width:min(100%, 190px);
   max-width:190px;
   max-height:180px;
   height:auto;
   object-fit:contain;
   object-position:left top;
}

.admin-auth-brand{
   align-items:center;
}

.admin-auth-copy{
   display:grid;
   gap:2px;
   color:var(--brand-navy);
   line-height:1.05;
}

.admin-auth-copy strong{
   font-size:2.1rem;
   font-weight:600;
   letter-spacing:-.03em;
}

.admin-auth-copy small{
   color:var(--brand-red);
   font-size:1.15rem;
   font-weight:700;
   letter-spacing:.08em;
   text-transform:uppercase;
}

.admin-brand-logo{
   gap:12px;
   align-items:center;
}

.admin-brand-image{
   width:auto;
   max-width:170px;
   max-height:48px;
}

.admin-brand-copy{
   display:grid;
   gap:2px;
   min-width:0;
}

.admin-brand-copy strong{
   color:var(--white);
   font-size:1.7rem;
   font-weight:600;
   line-height:1.1;
   letter-spacing:-.02em;
}

.admin-brand-copy small{
   color:rgba(255,255,255,.78);
   font-size:1.08rem;
   font-weight:600;
   letter-spacing:.08em;
   text-transform:uppercase;
}

@media (prefers-reduced-motion: reduce){
   html{
      scroll-behavior:auto;
   }

   *,
   *::before,
   *::after{
      animation:none!important;
      transition:none!important;
   }

   body.page-ready .site-header .flex,
   body.page-ready .footer .box-container,
   body.page-ready .auth-shell,
   body.page-ready .admin-topbar,
   body.page-ready .admin-header .admin-sidebar,
   body.page-ready .store-hero,
   body.page-ready .page-hero,
   body.page-ready .commerce-hero,
   body.page-ready .section-head,
   body.page-ready .trust-strip,
   body.page-ready .home-category .box-container,
   body.page-ready .products .box-container,
   body.page-ready .shopping-cart .box-container,
   body.page-ready .wishlist .box-container,
   body.page-ready .display-orders,
   body.page-ready .checkout-layout,
   body.page-ready .checkout-orders form,
   body.page-ready .update-profile form,
   body.page-ready .contact-layout,
   body.page-ready .contact-layout form,
   body.page-ready .contact-info-card,
   body.page-ready .reviews .box-container,
   body.page-ready .review-form,
   body.page-ready .dashboard .box-container,
   body.page-ready .show-products .box-container,
   body.page-ready .placed-orders .box-container,
   body.page-ready .user-accounts .box-container,
   body.page-ready .messages .box-container,
   body.page-ready .admin-reviews table,
   body.page-ready .order-box,
   body.page-ready .shop-settings-form,
   body.page-ready .modal-content,
   body.page-ready .products .box,
   body.page-ready .home-category .box,
   body.page-ready .trust-card,
   body.page-ready .promo-card,
   body.page-ready .shopping-cart .box,
   body.page-ready .wishlist .box,
   body.page-ready .placed-orders .box,
   body.page-ready .dashboard .box,
   body.page-ready .show-products .box,
   body.page-ready .user-accounts .box,
   body.page-ready .messages .box,
   body.page-ready .about .box,
   body.page-ready .category-card,
   body.page-ready .cart-item-card,
   body.page-ready .order-card,
   body.page-ready .admin-order-card{
      animation:none!important;
   }
}

/* SUNSIRI grocery UI system: shared customer, auth, and admin foundations */
:root{
   --primary:var(--brand-primary);
   --primary-strong:var(--brand-primary);
   --primary-soft:var(--brand-primary-soft);
   --primary-soft-2:var(--brand-primary-pale);
   --secondary:var(--brand-primary);
   --secondary-strong:var(--brand-primary-hover);
   --secondary-soft:var(--brand-primary-soft);
   --surface:var(--background-main);
   --surface-low:var(--surface-muted);
   --surface-container:var(--background-soft);
   --text:var(--text-primary);
   --muted:var(--text-secondary);
   --outline-soft:var(--border-color);
   --error:var(--danger);
}

html{
   background:var(--background-main);
}

body{
   background:var(--background-main);
   color:var(--text-primary);
   letter-spacing:0;
}

body,
input,
select,
textarea,
button{
   font-family:var(--font-body);
}

h1,h2,h3,h4,h5,h6,
.title{
   color:var(--text-primary);
   font-family:var(--font-heading);
   letter-spacing:0;
}

a,
button,
input,
select,
textarea{
   -webkit-tap-highlight-color:transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible{
   outline:3px solid rgba(48,59,143,.22);
   outline-offset:2px;
}

.btn,
input[type="submit"].btn{
   min-height:46px;
   padding:0 20px;
   border:1px solid var(--brand-primary);
   border-radius:14px;
   background:var(--brand-primary);
   color:#fff;
   box-shadow:0 7px 16px rgba(48,59,143,.14);
}

.btn:hover,
input[type="submit"].btn:hover{
   border-color:var(--brand-primary-hover);
   background:var(--brand-primary-hover);
   box-shadow:0 10px 22px rgba(48,59,143,.2);
}

.option-btn,
.view-btn,
.back-btn,
.see-more{
   min-height:44px;
   border:1px solid #CDD3EA;
   border-radius:14px;
   background:#fff;
   color:var(--brand-primary);
   box-shadow:none;
}

.option-btn:hover,
.view-btn:hover,
.back-btn:hover,
.see-more:hover{
   border-color:var(--brand-primary);
   background:var(--brand-primary-pale);
   color:var(--brand-primary-hover);
}

.delete-btn{
   min-height:44px;
   border:1px solid #FECACA;
   border-radius:14px;
   background:#FFF7F7;
   color:var(--danger);
   box-shadow:none;
}

.delete-btn:hover{
   border-color:var(--danger);
   background:var(--danger);
   color:#fff;
}

.box,
input.box,
select.box,
textarea.box,
.drop-down{
   border-color:var(--border-color);
}

input.box,
select.box,
textarea.box,
.drop-down,
.form-container form .box{
   width:100%;
   min-height:48px;
   padding:12px 14px;
   border:1px solid var(--border-color);
   border-radius:14px;
   background:#fff;
   color:var(--text-primary);
   box-shadow:0 1px 0 rgba(17,24,63,.02);
}

textarea.box{
   min-height:120px;
   resize:vertical;
}

input.box:hover,
select.box:hover,
textarea.box:hover,
.drop-down:hover,
.form-container form .box:hover{
   border-color:#C9CEE0;
}

input.box:focus,
select.box:focus,
textarea.box:focus,
.drop-down:focus,
.form-container form .box:focus{
   border-color:var(--brand-primary);
   box-shadow:0 0 0 4px rgba(48,59,143,.1);
}

.message{
   width:min(720px,calc(100% - 28px));
   margin:12px auto;
   padding:14px 16px;
   border:1px solid #C7D2FE;
   border-radius:14px;
   background:var(--brand-primary-pale);
   color:var(--brand-dark);
   box-shadow:var(--shadow-soft);
}

.message i{
   color:var(--brand-primary);
}

.empty{
   width:100%;
   padding:32px 22px;
   border:1px dashed #C9CEE0;
   border-radius:18px;
   background:var(--surface-muted);
   color:var(--text-secondary);
   text-align:center;
}

.site-header{
   position:sticky;
   top:0;
   z-index:1200;
   border-bottom:1px solid rgba(228,231,236,.9);
   background:rgba(255,255,255,.96);
   box-shadow:0 6px 24px rgba(17,24,63,.045);
   backdrop-filter:blur(14px);
}

.site-header .flex{
   width:min(var(--container),calc(100% - 40px));
   min-height:78px;
   gap:20px;
}

.site-header .logo{
   flex:0 0 auto;
}

.site-header .customer-brand-logo{
   max-width:176px;
   max-height:52px;
}

.navbar{
   gap:3px;
}

.navbar a{
   min-height:40px;
   display:inline-flex;
   align-items:center;
   padding:0 12px;
   border-radius:11px;
   color:#40465E;
   font-size:1.35rem;
   font-weight:700;
}

.navbar a:hover{
   background:var(--brand-primary-pale);
   color:var(--brand-primary);
}

.search-wrapper{
   min-width:220px;
   max-width:330px;
}

.search-wrapper input{
   min-height:44px;
   padding:0 44px 0 16px;
   border:1px solid var(--border-color);
   border-radius:14px;
   background:var(--surface-muted);
   color:var(--text-primary);
}

.search-wrapper input:focus{
   border-color:var(--brand-primary);
   background:#fff;
   box-shadow:0 0 0 4px rgba(48,59,143,.09);
}

.search-icon{
   color:var(--brand-primary);
}

#suggestions{
   margin-top:8px;
   border:1px solid var(--border-color);
   border-radius:14px;
   background:#fff;
   box-shadow:0 18px 42px rgba(17,24,63,.14);
   /* This rule sits after the base #suggestions block and has equal
      specificity, so a plain overflow:hidden here silently overrode the
      overflow:auto declared there. The list stayed capped at max-height
      with no way to reach the remaining rows. Clip horizontally only, so
      the rounded corners still crop child rows while the list scrolls. */
   overflow-y:auto;
   overflow-x:hidden;
}

.icons{
   gap:7px;
}

.icons a:not(.logout-btn),
#menu-btn{
   width:42px;
   height:42px;
   border:1px solid var(--border-color);
   border-radius:13px;
   background:#fff;
   color:var(--brand-primary);
}

.icons a:not(.logout-btn):hover,
#menu-btn:hover{
   border-color:#C7D2FE;
   background:var(--brand-primary-pale);
   color:var(--brand-primary-hover);
}

.logout-btn{
   min-height:42px;
   padding:0 14px;
   border:1px solid #CDD3EA;
   border-radius:13px;
   background:#fff;
   color:var(--brand-primary);
}

.footer{
   margin-top:64px;
   padding-top:52px;
   background:var(--brand-dark);
   color:#fff;
}

.footer .box-container{
   width:min(var(--container),calc(100% - 40px));
   gap:36px;
}

.footer .box{
   padding:0;
   background:transparent;
}

.footer .box h3,
.footer .footer-brand h3{
   color:#fff;
}

.footer .box a,
.footer .box p{
   color:#C7CAE0;
}

.footer .box a:hover,
.footer .box i,
.footer .credit span{
   color:#AEB8FF;
}

.footer .credit{
   margin-top:42px;
   border-top:1px solid rgba(255,255,255,.12);
   color:#AEB3C8;
}

.modal{
   background:rgba(17,24,63,.58);
   backdrop-filter:blur(5px);
}

.modal-content{
   border:1px solid rgba(255,255,255,.8);
   border-radius:22px;
   background:#fff;
   box-shadow:0 28px 80px rgba(17,24,63,.24);
}

.auth-page,
.admin-login-page{
   min-height:100vh;
   display:grid;
   place-items:center;
   padding:24px;
   background:var(--background-soft);
}

.auth-shell{
   width:min(1060px,calc(100% - 36px));
   min-height:650px;
   border:1px solid rgba(228,231,236,.9);
   border-radius:28px;
   background:#fff;
   box-shadow:0 24px 70px rgba(17,24,63,.12);
   overflow:hidden;
}

.auth-shell::before,
.auth-shell::after{
   display:none;
}

.auth-visual{
   min-width:0;
   padding:46px;
   background:var(--brand-primary-pale);
   color:var(--brand-dark);
}

.auth-visual::after{
   display:none;
}

.auth-copy h1{
   max-width:520px;
   color:var(--brand-dark);
   font-size:4.2rem;
   line-height:1.08;
   letter-spacing:0;
}

.auth-copy p{
   color:#5C6480;
}

.auth-points span{
   border:1px solid rgba(48,59,143,.12);
   border-radius:12px;
   background:rgba(255,255,255,.8);
   color:var(--brand-primary);
}

.form-container{
   padding:46px;
   background:#fff;
}

.form-container form{
   width:100%;
   max-width:440px;
   padding:0;
   border:0;
   background:transparent;
   box-shadow:none;
}

.form-container form h2,
.form-container form h3{
   font-size:3rem;
   letter-spacing:0;
}

.auth-field-stack{
   gap:16px;
}

.auth-field-stack label{
   gap:7px;
}

.auth-field-stack label span{
   color:#3E455F;
   font-weight:700;
}

.admin-auth-copy strong{
   color:var(--brand-dark);
}

.admin-auth-copy small{
   color:var(--brand-primary);
}

table{
   border-collapse:separate;
   border-spacing:0;
}

th{
   color:var(--text-secondary);
   font-weight:600;
}

@media (max-width:1080px){
   .site-header .flex{
      gap:12px;
   }

   .site-header .search-wrapper{
      flex:1 1 240px;
      max-width:none;
   }
}

@media (max-width:920px){
   .site-header .flex{
      width:min(100% - 24px,var(--container));
      min-height:70px;
      flex-wrap:wrap;
      padding:10px 0;
   }

   #menu-btn{
      display:inline-flex;
      order:4;
   }

   .site-header .navbar{
      top:100%;
      left:12px;
      right:12px;
      width:auto;
      padding:10px;
      border:1px solid var(--border-color);
      border-radius:16px;
      background:#fff;
      box-shadow:0 20px 44px rgba(17,24,63,.16);
   }

   .site-header .navbar a{
      width:100%;
      justify-content:flex-start;
   }

   .auth-shell,
   .admin-login-page .auth-shell{
      grid-template-columns:1fr;
      min-height:0;
   }

   .auth-visual{
      min-height:360px;
   }
}

/* Phase 2: shared SUNSIRI customer-home visual system. */
:root{
   --brand-primary:var(--galle-navy);
   --brand-primary-hover:var(--galle-navy-deep);
   --brand-primary-dark:var(--galle-navy-deep);
   --brand-primary-soft:#eaf3ff;
   --brand-navy:var(--galle-navy);
   --page-background:#f7f9fd;
   --surface:#ffffff;
   --surface-muted:#f2f6fc;
   --text-primary:#132445;
   --text-secondary:#68758d;
   --border-color:#dfe7f3;
   --success:#168354;
   --warning:#c76a10;
   --danger:#c93636;
   --radius-small:10px;
   --radius-medium:16px;
   --radius-large:22px;
   --shadow-small:0 4px 14px rgba(21, 52, 105, .07);
   --shadow-card:0 10px 28px rgba(17, 48, 96, .09);
   --container-width:1400px;
   --section-spacing:42px;
}

.site-header{
   position:relative;
   z-index:40;
   background:var(--surface);
   border-bottom:1px solid var(--border-color);
   box-shadow:0 2px 13px rgba(14, 42, 88, .04);
}

.service-strip{
   background:linear-gradient(90deg, var(--brand-primary-dark), var(--brand-primary));
   color:#fff;
   font-size:1.2rem;
}

.service-strip-inner{
   width:min(var(--container-width), calc(100% - 48px));
   min-height:32px;
   margin:0 auto;
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:16px;
}

.service-strip span,
.service-strip a{
   color:#fff;
   display:inline-flex;
   align-items:center;
   gap:7px;
}

.site-header .flex.customer-header-main{
   width:min(var(--container-width), calc(100% - 48px));
   min-height:116px;
   margin:0 auto;
   padding:14px 0 0;
   display:grid;
   grid-template-columns:auto minmax(280px, 1fr) auto;
   grid-template-areas:
      "brand search actions"
      "nav nav nav";
   align-items:center;
   column-gap:30px;
   row-gap:13px;
}

.site-header .logo{
   grid-area:brand;
   min-width:148px;
   color:var(--brand-primary-dark);
}

.site-header .customer-brand-logo{
   width:auto;
   max-width:166px;
   max-height:63px;
   object-fit:contain;
}

.site-header .search-wrapper{
   grid-area:search;
   position:relative;
   width:100%;
   max-width:680px;
   justify-self:center;
}

.site-header .search-wrapper input{
   width:100%;
   height:48px;
   padding:0 58px 0 17px;
   border:1px solid #ccd9ee;
   border-radius:var(--radius-small);
   background:#fff;
   color:var(--text-primary);
   font-size:1.35rem;
   box-shadow:inset 0 1px 2px rgba(15, 47, 94, .03);
}

.site-header .search-wrapper input:focus{
   border-color:var(--brand-primary);
   box-shadow:0 0 0 4px rgba(20, 87, 184, .12);
}

.site-header .search-icon{
   position:absolute;
   right:5px;
   top:5px;
   width:38px;
   height:38px;
   display:grid;
   place-items:center;
   border-radius:8px;
   background:var(--brand-primary);
   color:#fff;
   pointer-events:none;
}

.site-header .icons{
   grid-area:actions;
   display:flex;
   align-items:center;
   justify-content:flex-end;
   gap:8px;
   margin:0;
}

.site-header .icons > a,
.site-header .header-logout-form .logout-btn,
.site-header .icons > .logout-btn{
   min-width:42px;
   min-height:42px;
   padding:0 10px;
   border:1px solid transparent;
   border-radius:9px;
   color:var(--text-primary);
   background:transparent;
   display:inline-flex;
   align-items:center;
   justify-content:center;
   gap:7px;
   font-size:1.25rem;
}

.site-header .icons > a:hover,
.site-header .header-logout-form .logout-btn:hover,
.site-header .icons > .logout-btn:hover{
   color:var(--brand-primary);
   border-color:#cfe0f8;
   background:var(--brand-primary-soft);
}

.site-header .header-logout-form{
   margin:0;
}

.site-header .navbar{
   grid-area:nav;
   width:100%;
   display:flex;
   align-items:center;
   gap:5px;
   padding:8px 0 11px;
   border-top:1px solid #edf1f7;
}

.site-header .navbar a{
   padding:8px 13px;
   border-radius:8px;
   color:#3d4a62;
   font-size:1.3rem;
   font-weight:700;
}

.site-header .navbar a:hover,
.site-header .navbar a:focus-visible{
   color:var(--brand-primary);
   background:var(--brand-primary-soft);
}

.site-header .navbar .mobile-nav-only{
   display:none;
}

.site-header #menu-btn{
   display:none;
   grid-area:menu;
   width:42px;
   height:42px;
   padding:0;
   border:1px solid var(--border-color);
   border-radius:9px;
   background:#fff;
   color:var(--brand-primary);
   font-size:1.7rem;
   cursor:pointer;
}

/* The ≤1080/1024/920px un-hide rules above (bare "#menu-btn", specificity
   0-1-0) never actually won against the ".site-header #menu-btn{display:
   none}" base rule two lines up (specificity 0-1-1) - equal-or-lower
   specificity loses regardless of the cascade's media-query nesting or
   source order, so the hamburger stayed display:none the whole 861-1080px
   range and there was no way to reach the nav drawer (All Categories, New
   Arrivals, Offers, Orders, About, Contact) at that width. Matching the
   base rule's own selector, at the same breakpoint the header itself
   already switches to its collapsed grid (≤1080px, see the .site-header
   .flex rule above), restores it - the existing ≤860px rule below keeps
   winning past this for the same reason (later in source, same
   specificity). */
@media (max-width:1080px){
   .site-header #menu-btn{
      display:inline-flex;
   }
}

.footer.customer-footer{
   margin-top:64px;
   padding:52px 0 0;
   background:var(--brand-navy);
   color:#d9e6fb;
}

.customer-footer .footer-grid{
   width:min(var(--container-width), calc(100% - 48px));
   margin:0 auto;
   display:grid;
   grid-template-columns:minmax(220px, 1.45fr) repeat(3, minmax(150px, 1fr));
   gap:34px;
}

.customer-footer .box h3,
.customer-footer .box p,
.customer-footer .box a{
   color:inherit;
}

.customer-footer .box h3{
   margin:0 0 14px;
   color:#fff;
   font-size:1.7rem;
}

.customer-footer .box p{
   line-height:1.65;
   color:#b8c8e5;
}

.customer-footer .footer-brand-logo{
   width:auto;
   max-width:170px;
   max-height:58px;
   margin-bottom:12px;
   object-fit:contain;
}

.customer-footer .footer-links a{
   display:block;
   margin:0 0 10px;
   color:#c9d8f1;
}

.customer-footer .footer-links a:hover{
   color:#fff;
   transform:translateX(2px);
}

.customer-footer .credit{
   width:min(var(--container-width), calc(100% - 48px));
   margin:34px auto 0;
   padding:19px 0;
   border-top:1px solid rgba(207, 224, 248, .18);
   color:#9cb3d8;
   text-align:left;
}

@media (max-width:860px){
   .site-header .flex.customer-header-main{
      min-height:0;
      grid-template-columns:auto 1fr auto auto;
      grid-template-areas:
         "brand search actions menu"
         "nav nav nav nav";
      column-gap:12px;
   }

   /* Opened mobile navigation.
      A legacy .site-header .navbar a{width:100%} rule (an older, since
      superseded anchored-dropdown design further up this file) was never
      cleaned up when this row-based layout replaced it, and this rule never
      constrained the row's OWN width - so every link stretched to the full
      header width and stacked into a 6-row, ~290px sheet that pushed page
      content down instead of floating over it. Constraining the panel here
      is the actual fix: the legacy width:100% on the links is untouched and
      now does exactly the right thing inside a properly sized panel. */
   .site-header .navbar{
      display:none;
      position:absolute;
      top:calc(100% + 8px);
      /* An older, superseded dropdown rule elsewhere in this file also sets
         left:12px at this width; declaring left:auto here cancels it so the
         panel anchors purely from the right (under the hamburger) instead
         of the browser having to resolve a left+right+width conflict. */
      left:auto;
      right:12px;
      z-index:41;
      width:min(240px, calc(100vw - 24px));
      flex-direction:column;
      flex-wrap:nowrap;
      gap:2px;
      margin-bottom:0;
      padding:8px;
      border:1px solid var(--border-color);
      border-radius:var(--radius-medium);
      background:var(--surface);
      box-shadow:var(--shadow-small);
   }

   .site-header .navbar.active{
      display:flex;
   }

   .site-header .navbar a{
      display:flex;
      align-items:center;
      gap:10px;
      min-height:48px;
   }

   .site-header .navbar .mobile-nav-only{
      display:inline-flex;
   }

   .site-header #menu-btn{
      display:grid;
      place-items:center;
   }

   /* Tablet action cells are intentionally icon-only. Their desktop labels
      otherwise overflow the fixed 42px cells and visually run together. */
   .site-header .header-action span,
   .site-header .logout-btn span{
      display:none;
   }

   .customer-footer .footer-grid{
      grid-template-columns:repeat(2, minmax(0, 1fr));
   }
}

/* Phase 2B: closer commercial density for the shared customer chrome. */
@media (min-width:861px){
   .site-header .flex.customer-header-main{
      min-height:130px;
      grid-template-columns:190px minmax(400px, 1fr) auto;
      column-gap:34px;
      row-gap:11px;
      padding-top:12px;
   }

   .site-header .logo{
      min-width:190px;
   }

   .site-header .customer-brand-logo{
      max-width:190px;
      max-height:82px;
   }

   .site-header .search-wrapper{
      max-width:760px;
   }

   .site-header .search-wrapper input{
      height:56px;
      padding-left:20px;
      font-size:1.42rem;
   }

   .site-header .search-icon{
      top:5px;
      right:5px;
      width:46px;
      height:46px;
      border-radius:9px;
   }

   .site-header .icons{
      gap:8px;
   }

   .site-header .icons > a,
   .site-header .header-logout-form .logout-btn,
   .site-header .icons > .logout-btn{
      min-width:58px;
      min-height:54px;
      padding:4px 7px;
      flex-direction:column;
      gap:3px;
      font-size:1.7rem;
   }

   /* Every action in this row stacks its icon over its label. The cart sat on
      its own centred layout, so its icon and wording never lined up with
      Wishlist/Account/Logout. Top-align the row and give all four actions the
      same box, icon size, and internal spacing. */
   .site-header .icons{
      align-items:flex-start;
   }

   .site-header .icons > a,
   .site-header .header-logout-form .logout-btn,
   .site-header .icons > .logout-btn,
   .site-header .icons > .header-cart-action{
      justify-content:flex-start;
      gap:.8rem;
      min-height:6.2rem;
      padding-block:.4rem;
   }

   .site-header .header-logout-form{
      display:flex;
      align-items:stretch;
   }

   .site-header .icons > .header-cart-action{
      display:flex;
      flex-direction:column;
      align-items:center;
   }

   .site-header .header-cart-copy{
      align-items:center;
      max-width:100%;
      text-align:center;
   }

   /* The cart uses a 3.2rem icon wrapper for its badge; give the plain glyph
      actions the same box so all four icons occupy one row and their labels
      start at the same height. */
   .site-header .icons > a > i,
   .site-header .header-logout-form .logout-btn > i,
   .site-header .icons > .logout-btn > i{
      display:inline-grid;
      place-items:center;
      flex:0 0 3.2rem;
      width:3.2rem;
      height:3.2rem;
   }

   .site-header .header-action span,
   .site-header .logout-btn span{
      display:block;
      font-size:1rem;
      font-weight:700;
      line-height:1.1;
   }

   .site-header .navbar{
      gap:8px;
      min-height:43px;
      padding:7px 0 10px;
   }

   .site-header .navbar a{
      display:inline-flex;
      align-items:center;
      gap:7px;
      padding:8px 14px;
      font-size:1.28rem;
   }

   .site-header .navbar a i{
      color:var(--brand-primary);
      font-size:1.15rem;
   }
}

.footer.customer-footer{
   margin-top:48px;
   padding-top:40px;
}

.customer-footer .footer-grid{
   gap:28px;
}

.customer-footer .footer-brand-logo{
   max-width:195px;
   max-height:70px;
}

.customer-footer .box h3{
   margin-bottom:11px;
   font-size:1.55rem;
}

.customer-footer .footer-links a{
   margin-bottom:8px;
   font-size:1.2rem;
}

.customer-footer .credit{
   margin-top:26px;
   padding:14px 0;
   font-size:1.1rem;
}

/* Phase 9: compact, server-backed cart summary in the approved header. */
.site-header .header-cart-action{
   position:relative;
}

.site-header .header-cart-icon{
   position:relative;
   display:inline-grid;
   width:1.65em;
   height:1.65em;
   place-items:center;
}

.site-header .header-cart-badge{
   position:absolute;
   top:-7px;
   right:-9px;
   display:grid;
   min-width:17px;
   height:17px;
   padding:0 4px;
   place-items:center;
   border:2px solid #fff;
   border-radius:999px;
   background:var(--brand-primary);
   color:#fff;
   font-size:1rem;
   font-weight:600;
   line-height:1;
}

.site-header .header-cart-badge[hidden]{
   display:none;
}

.site-header .header-cart-copy{
   display:inline-flex;
   flex-direction:column;
   align-items:flex-start;
   gap:2px;
   line-height:1.05;
}

.site-header .header-cart-label{
   font-weight:700;
}

.site-header .header-cart-total{
   color:var(--text-secondary);
   font-size:.98rem;
   font-weight:700;
   white-space:nowrap;
}

@media (min-width:861px){
   .site-header .icons > .header-cart-action{
      min-width:88px;
      padding-inline:7px;
      flex-direction:column;
      align-items:center;
      gap:8px;
   }

   .site-header .header-cart-action .header-cart-icon{
      font-size:1.55rem;
   }

   .site-header .header-cart-action .header-cart-copy{
      display:inline-flex;
   }

   .site-header .header-cart-action .header-cart-label{
      display:block;
      font-size:1.12rem;
   }
}

@media (max-width:860px){
   .site-header .header-cart-copy{
      display:none;
   }

   .site-header .header-cart-action .header-cart-icon{
      display:inline-grid;
   }
}

/* Final homepage polish: keep the shared customer header dense and legible. */
@media (min-width:861px){
   .site-header .flex.customer-header-main{
      min-height:136px;
      grid-template-columns:208px minmax(440px, 1fr) auto;
      column-gap:30px;
   }

   .site-header .customer-brand-logo{
      max-width:204px;
      max-height:88px;
   }

   .site-header .search-wrapper{
      max-width:790px;
   }

   .site-header .icons{
      gap:11px;
   }

   .site-header .header-action span,
   .site-header .logout-btn span{
      font-size:1.08rem;
   }
}

.customer-footer .footer-grid{
   gap:24px;
}

/* Compact Sinhala oval mark: centered inside the existing brand grid cell so
   the search and action columns retain their established alignment. */
.site-header .logo{
   display:flex;
   align-items:center;
   justify-content:center;
}

.site-header .customer-brand-logo{
   width:124px;
   max-width:124px;
   height:auto;
   max-height:none;
   object-fit:contain;
   border-radius:0;
}

.site-header .logo .customer-brand-logo{
   width:124px;
   height:auto;
   max-width:124px;
   max-height:none;
   object-fit:contain;
}

@media (min-width:861px){
   /* The search track used to demand 440px outright, so between 861px and
      roughly 900px the actions column was squeezed below its content width and
      the Logout button spilled past the header container. Let the search field
      absorb the shortfall and reserve the actions column at its real width. */
   .site-header .flex.customer-header-main{
      grid-template-columns:150px minmax(0, 1fr) max-content;
   }

   .site-header .logo{
      min-width:150px;
   }

   .site-header .icons{
      min-width:max-content;
   }
}

@media (max-width:860px){
   .site-header .logo .customer-brand-logo{
      width:96px;
      max-width:96px;
      height:auto;
      max-height:none;
   }
}

.customer-footer .footer-brand-logo{
   max-width:205px;
   max-height:74px;
}

.customer-footer .footer-links a{
   margin-bottom:7px;
}

/* Final homepage micro-polish: preserve the established header layout. */
.site-header .search-icon{
   top:50%;
   right:5px;
   width:38px;
   height:38px;
   transform:translateY(-50%);
   line-height:1;
   font-size:1.45rem;
}

@media (min-width:861px){
   .site-header .icons{
      gap:12px;
   }

   .site-header .icons > a,
   .site-header .header-logout-form .logout-btn,
   .site-header .icons > .logout-btn{
      font-size:1.32rem;
      gap:8px;
   }

   .site-header .icons > a > i,
   .site-header .header-logout-form .logout-btn > i,
   .site-header .icons > .logout-btn > i{
      font-size:1.55rem;
   }

   .site-header .header-action span,
   .site-header .logout-btn span{
      font-size:1.12rem;
      font-weight:700;
   }
}

/* Phase 8: customer access screens share one compact, focused auth system. */
.customer-login-page .auth-shell,
.customer-register-page .auth-shell{
   grid-template-columns:minmax(0,1fr) minmax(390px,440px);
   gap:0;
   min-height:620px;
   padding:0;
}

.customer-login-page .auth-visual,
.customer-register-page .auth-visual{
   min-height:620px;
   padding:42px;
   border:0;
   border-radius:0;
}

.customer-login-page .auth-brand,
.customer-register-page .auth-brand{
   display:block;
   width:min(100%,190px);
   margin:0 auto;
}

.customer-login-page .auth-brand-image,
.customer-register-page .auth-brand-image{
   display:block;
   width:auto;
   max-width:190px;
   max-height:180px;
   height:auto;
   object-fit:contain;
   object-position:center top;
}

/* No approved Galle logo exists, so every visit currently renders the
   icon+text fallback (<i class="fas fa-basket-shopping"><span>{shop
   name}</span>) inside .auth-brand rather than an <img> - the
   .auth-brand-image rules above are dead weight for that branch. This
   makes the fallback itself look like a deliberate compact brand mark
   instead of default inline icon+text. Higher-specificity than the
   plain .auth-brand/.auth-brand i/.auth-brand span rules earlier in
   this file, so it wins without !important. */
.customer-login-page .auth-brand,
.customer-register-page .auth-brand{
   display:flex;
   align-items:center;
   justify-content:center;
   gap:10px;
   font-size:1.6rem;
   font-weight:800;
}

.customer-login-page .auth-brand i,
.customer-register-page .auth-brand i{
   display:grid;
   place-items:center;
   width:40px;
   height:40px;
   flex:0 0 auto;
   border-radius:10px;
   background:var(--brand-primary, var(--brand-navy));
   color:#fff;
   font-size:1.2rem;
}

.customer-login-page .auth-brand span,
.customer-register-page .auth-brand span{
   color:var(--text-primary, var(--text));
}

.customer-register-page .auth-visual{
   align-content:center;
   gap:38px;
}

.customer-login-page .auth-copy,
.customer-register-page .auth-copy{
   max-width:500px;
}

.customer-login-page .auth-copy h1,
.customer-register-page .auth-copy h1{
   max-width:480px;
   font-size:4.2rem;
   line-height:1.08;
   letter-spacing:0;
}

.customer-login-page .auth-copy p,
.customer-register-page .auth-copy p{
   max-width:460px;
   font-size:1.55rem;
   line-height:1.55;
}

.customer-login-page .auth-points,
.customer-register-page .auth-points{
   gap:8px;
}

.customer-login-page .auth-points span,
.customer-register-page .auth-points span{
   min-height:38px;
   padding:8px 11px;
   border-color:rgba(48,59,143,.14);
   border-radius:11px;
   color:var(--brand-primary);
   font-size:1.18rem;
}

.customer-login-page .auth-points i,
.customer-register-page .auth-points i{
   width:15px;
   text-align:center;
   font-size:1.2rem;
}

.customer-login-page .form-container,
.customer-register-page .form-container{
   display:flex;
   align-items:center;
   justify-content:center;
   min-height:620px;
   padding:42px;
}

.customer-login-page .form-container form,
.customer-register-page .form-container form{
   width:100%;
   max-width:360px;
}

.customer-login-page .auth-form-head,
.customer-register-page .auth-form-head{
   margin-bottom:18px;
}

.customer-login-page .form-container form h3,
.customer-register-page .form-container form h2,
.form-container form h3{
   font-size:3rem;
   letter-spacing:0;
}

.customer-login-page .form-container form .form-subtitle,
.customer-register-page .form-container form .form-subtitle{
   min-height:44px;
   margin-bottom:18px;
   font-size:1.4rem;
   line-height:1.55;
}

.customer-login-page .auth-field-stack,
.customer-register-page .auth-field-stack{
   gap:14px;
}

.customer-login-page .auth-field-stack label,
.customer-register-page .auth-field-stack label{
   gap:7px;
}

.auth-password-control{
   position:relative;
   display:grid;
   grid-template-columns:minmax(0,1fr) 44px;
   width:100%;
}

.auth-field{
   display:grid;
   gap:7px;
}

.auth-field > label{
   color:var(--text-soft);
   font-size:1.3rem;
   font-weight:600;
}

.customer-login-page .auth-password-control .box,
.customer-register-page .auth-password-control .box{
   width:100%;
   padding-right:15px;
   border-radius:12px 0 0 12px;
}

.auth-password-toggle{
   position:static;
   display:grid;
   width:44px;
   height:48px;
   padding:0;
   place-items:center;
   border:1px solid var(--border-color);
   border-left:0;
   border-radius:0 12px 12px 0;
   background:#fff;
   color:var(--muted);
   cursor:pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible{
   background:var(--secondary-soft);
   color:var(--secondary);
}

.auth-field-hint{
   color:var(--muted);
   font-size:1.18rem;
   line-height:1.45;
}

.auth-forgot-link{
   margin:0!important;
   text-align:right;
   font-size:1.24rem!important;
}

.auth-info-panel{
   width:100%;
   max-width:360px;
   padding:30px;
   border:1px solid #e1e7df;
   border-radius:22px;
   background:#fff;
   box-shadow:0 18px 50px rgba(23,32,26,.08);
}

.auth-info-panel h2{
   color:var(--text);
   font-size:3rem;
   line-height:1.12;
}

.auth-contact-actions .btn,
.auth-contact-actions .option-btn,
.auth-full-width{
   display:flex;
   align-items:center;
   justify-content:center;
   width:100%;
   text-align:center;
}

.auth-secondary-link{
   margin-top:18px;
   text-align:center;
   font-size:1.3rem;
}

.customer-login-page .form-container form .box,
.customer-register-page .form-container form .box{
   height:48px;
   min-height:48px;
   margin:0;
   padding:0 15px;
   border-radius:12px;
   font-size:1.4rem;
}

.customer-login-page .form-container form .auth-password-control .box,
.customer-register-page .form-container form .auth-password-control .box{
   border-radius:12px 0 0 12px;
}

.customer-login-page .form-container form .btn,
.customer-register-page .form-container form .btn{
   min-height:48px;
   margin-top:0;
   border-radius:12px;
   font-size:1.4rem;
}

.customer-login-page .form-container form > p,
.customer-register-page .form-container form > p{
   margin-top:17px;
   font-size:1.3rem;
   line-height:1.5;
}

.customer-login-page .message,
.customer-register-page .message{
   border-color:#fecaca;
   border-left-color:var(--danger);
   background:#fff7f7;
   color:#8f2020;
}

.customer-login-page .message i,
.customer-register-page .message i{
   color:var(--danger);
}

@media (max-width:920px){
   .customer-login-page .auth-shell,
   .customer-register-page .auth-shell{
      grid-template-columns:1fr;
      min-height:0;
   }

   .customer-login-page .auth-visual,
   .customer-register-page .auth-visual,
   .customer-login-page .form-container,
   .customer-register-page .form-container{
      min-height:0;
   }

   .customer-login-page .auth-visual,
   .customer-register-page .auth-visual{
      min-height:300px;
      padding:32px;
   }

   .customer-register-page .auth-visual{
      align-content:center;
   }

   .customer-login-page .form-container,
   .customer-register-page .form-container{
      padding:36px 32px;
   }
}

/* Preserve the compact Phase 9 cart badge after shared header typography. */
.site-header .header-cart-badge{
   font-size:1rem;
   font-weight:600;
}

/* Customer cart action: keep the badge anchored inside its icon wrapper and
   reserve enough desktop room for the label and server-confirmed total. */
.site-header .header-cart-action{
   min-width:0;
   overflow:visible;
}

.site-header .header-cart-icon{
   position:relative;
   flex:0 0 3.2rem;
   width:3.2rem;
   height:3.2rem;
   overflow:visible;
}

.site-header .header-cart-badge{
   top:0;
   right:0;
   min-width:1.8rem;
   height:1.8rem;
   padding:0 .35rem;
   border-width:1px;
   font-size:.85rem;
}

.site-header .header-cart-copy{
   min-width:0;
   max-width:11rem;
}

.site-header .header-cart-total{
   display:block;
   max-width:100%;
   overflow:hidden;
   text-overflow:ellipsis;
}

@media (min-width:1181px){
   /* Desktop is the only width that shows the cart total. All four actions
      share one fixed icon / label / meta structure now, each slot a fixed
      height, so every slot lands at the same position across Cart, Wishlist,
      Account and Logout regardless of which action has content for it: Cart's
      meta slot holds "Rs. x.xx", the others reserve the same slot empty. */
   .site-header .icons > a,
   .site-header .header-logout-form .logout-btn,
   .site-header .icons > .logout-btn,
   .site-header .icons > .header-cart-action{
      /* A legacy ".icons a:not(.logout-btn)" rule still pins plain-anchor
         actions (Wishlist, Account, Cart) to a fixed 42px height. That's
         lower than this row's own min-height, but a definite `height` still
         makes flex treat the box as fixed-size and forces its own content to
         shrink to fit — which is what was crushing the cart total and the
         reserved spacer row. Reclaim auto sizing here so height comes from
         content, same as the Logout button (a <button>, never matched by
         that legacy selector) already gets. */
      height:auto;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:flex-start;
      gap:.4rem;
   }

   /* :not(.header-cart-action) because the cart link is itself an <a> — it
      already supplies real row-3 content (the total), so it must not also
      pick up this empty spacer meant for the other three actions. */
   .site-header .icons > a:not(.header-cart-action)::after,
   .site-header .header-logout-form .logout-btn::after,
   .site-header .icons > .logout-btn::after{
      content:"";
      display:block;
      height:1.2rem;
   }

   .site-header .icons > .header-cart-action{
      min-width:8.6rem;
      padding-inline:1rem;
   }

   /* The cart icon is a <span>, and it sits inside an element classed
      ".header-action" — so the generic ".header-action span{display:block}"
      label rule (meant for the plain text labels) also matches it, and wins
      on specificity over ".header-cart-icon{display:inline-grid}". That
      silently flattened the icon wrapper to a block box, which left its
      glyph top-anchored instead of vertically centered like the other three
      icons, reading as "the cart icon sits higher". Reassert the grid here
      with enough specificity to win. */
   .site-header .icons > .header-cart-action .header-cart-icon{
      display:inline-grid;
   }

   /* Unwrap the label+total wrapper so both become direct flex children,
      matching the icon/label/spacer stack the other three actions use. This
      has to out-specificity the "861px" .header-cart-action .header-cart-copy
      rule that forces it back to inline-flex. */
   .site-header .icons > .header-cart-action .header-cart-copy{
      display:contents;
   }

   .site-header .header-cart-label{
      display:block;
   }

   .site-header .header-cart-total{
      display:block;
      flex:0 0 1.2rem;
      height:1.2rem;
      line-height:1.2rem;
      margin:0;
      overflow:visible;
      white-space:nowrap;
   }
}

@media (min-width:861px) and (max-width:1180px){
   .site-header .icons > .header-cart-action{
      min-width:5.8rem;
      padding-inline:.7rem;
   }

   .site-header .header-cart-action .header-cart-copy{
      display:none;
   }
}

/* Admin login: the customer auth screens already collapse to one column and
   shrink their brand mark below 920/640px, but the admin screen never received
   the same treatment, so its brand row (a max-content flex row) pushed past the
   viewport on narrow phones. Mirror the customer rules here. */
@media (max-width:920px){
   .admin-login-page .auth-shell{
      grid-template-columns:1fr;
      min-height:0;
   }

   .admin-login-page .auth-visual,
   .admin-login-page .form-container{
      min-height:0;
   }

   .admin-login-page .auth-visual{
      padding:32px;
   }

   .admin-login-page .form-container{
      padding:36px 32px;
   }
}

/* The brand row must never be wider than its column, at any width. */
.auth-brand{
   width:auto;
   max-width:100%;
   flex-wrap:wrap;
}

.auth-brand-image{
   max-width:min(220px, 100%);
}

.admin-auth-copy{
   min-width:0;
}

.admin-auth-copy strong,
.admin-auth-copy small{
   overflow-wrap:anywhere;
}

/* Signed-out header cart: no running total to stack, so it adopts the same
   icon-over-label shape as Wishlist, Account and Login instead of keeping the
   two-column layout that exists only to carry the total. */
@media (min-width:861px){
   .site-header .icons > .header-cart-action-compact{
      min-width:58px;
      display:inline-flex;
      flex-direction:column;
      align-items:center;
      gap:3px;
      padding-inline:0;
      grid-template-columns:none;
   }

   .site-header .header-cart-action-compact .header-cart-copy{
      display:block;
   }
}

/* ---------------------------------------------------------------------
   Customer auth logo (login/register/forgot/set-password) - fixes two
   defects verified live (screenshot review, uploaded-logo test):
   1. .auth-visual (defined once, shared with admin-login-page) sets
      align-content:space-between - fine for the admin panel's decorative
      floating shapes, but on the flat customer panel it pins the brand
      row to the very top and the "Welcome back" copy to the very bottom,
      leaving 250-350px of dead space between them at typical viewport
      heights instead of the two reading as one grouped block.
   2. Two earlier rules both match `.customer-login-page .auth-brand`
      at identical specificity (one class + one class): an old one sets
      margin:0, a newer one sets margin:0 auto intending to center it.
      They resolve unpredictably rather than reliably centering the logo
      under the cascade's normal same-specificity/source-order rule, so
      this states the intent once, last, so there is only one answer.
   --------------------------------------------------------------------- */
.customer-login-page .auth-visual,
.customer-register-page .auth-visual{
   align-content:center;
}

.customer-login-page .auth-brand,
.customer-register-page .auth-brand{
   margin:0 auto;
}

/* forgot_password.php/set_password.php wrap their form-side content in
   .auth-info-panel, a bordered card with its own 30px padding, sitting
   INSIDE .form-container's existing 42px padding - a second, nested inset
   login.php/register.php's plain <form> doesn't have. Their heading/
   label/button column starts 31px to the right of login's and register's
   for no content reason, which is the screenshot-7 misalignment: every
   page's content column should start at the same x. Dropping the card
   chrome (border/shadow/background/padding) makes .auth-info-panel a
   plain full-width wrapper, flush with .form-container's own padding -
   the same box every other auth page already uses. */
.auth-info-panel{
   width:100%;
   max-width:none;
   padding:0;
   border:0;
   border-radius:0;
   background:none;
   box-shadow:none;
}

/* Matches register.php's plain, left-aligned "Already shop...? Log in"
   line below its submit button - .auth-secondary-link was the only one
   of the four pages' equivalent link centered instead of following the
   same content column as the heading/button above it. */
.auth-secondary-link{
   text-align:left;
}

/* Temporary notices (data-notice="success"): fade, then collapse, then the
   script removes the node. Only adds dismissal behaviour - no visual change. */
.message[data-notice]{
   transition:opacity 280ms ease, height 200ms ease, margin 200ms ease, padding 200ms ease, border-width 200ms ease;
}

.message.is-dismissing{
   opacity:0;
}

.message.is-collapsing{
   margin-block:0;
   padding-block:0;
   border-width:0;
}

@media (prefers-reduced-motion:reduce){
   .message[data-notice]{
      transition:none;
   }
}

/* =====================================================================
   MOBILE AUTH (phone < 768px): compact brand card + compact form card.
   Raised specificity (:not pairs) only to beat the legacy layers above.
   ===================================================================== */


/* =====================================================================
   MOBILE AUTH LAYER (login / register / forgot / set password, <= 820px):
   one compact brand card + one compact form card. Replaces the older
   phone-width auth rules. Sizes are px because html is 62.5%.
   ===================================================================== */
@media (max-width:738px){
   :root body.auth-page{padding:0}
   :root body.auth-page .auth-shell{width:100%;min-height:100dvh;border-radius:0;border:0;box-shadow:none;background:var(--surface-muted,#f6f8fc);margin:0;padding:10px 12px calc(24px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:8px}
   :root body.auth-page .auth-visual{width:100%;max-width:440px;min-height:0;margin:0 auto;padding:10px 14px;gap:5px;border-radius:12px}
   :root body.auth-page .auth-brand{margin:0 auto;gap:8px;font-size:15px}
   :root body.auth-page .auth-brand i{width:30px;height:30px;font-size:14px;border-radius:9px}
   :root body.auth-page .auth-copy{margin:0;gap:4px;text-align:left}
   :root body.auth-page .auth-copy .eyebrow{margin:0 0 4px;font-size:11px}
   :root body.auth-page .auth-copy h1{margin:0 0 4px;font-size:21px;line-height:1.2}
   :root body.auth-page .auth-copy p{margin:0;font-size:12px;line-height:1.4}
   :root body.auth-page .auth-points{display:none}
   :root body.auth-page .form-container{width:100%;max-width:440px;margin:0 auto;padding:12px 14px;border-radius:12px}
   :root body.auth-page .form-container form h2{margin:0 0 3px;font-size:18px}
   :root body.auth-page .form-container form .form-subtitle,
   :root body.auth-page .form-container form p{font-size:12.5px;line-height:1.4}
   :root body.auth-page .auth-form-head{margin-bottom:6px}
   :root body.auth-page .auth-field-stack{gap:8px}
   :root body.auth-page .form-container form label,
   :root body.auth-page .form-container form label span{font-size:13px}
   :root body.auth-page .form-container form .box{height:40px;min-height:40px;padding:0 12px;font-size:13.5px}
   :root body.auth-page .auth-password-control,
   :root body.auth-page .auth-password-toggle{height:40px;min-height:0}
   :root body.auth-page .auth-password-toggle{width:40px}
   :root body.auth-page .form-container form .btn{width:100%;height:42px;min-height:42px;font-size:13.5px}
   :root body.auth-page .auth-shell::before,
   :root body.auth-page .auth-shell::after{display:none}
}

/* admin password setup page: hidden panels must stay hidden whatever the form/auth styles say */
#set-password-form[hidden],#set-password-invalid[hidden]{display:none !important}
