/* Shared chrome — Remas geometry (40px top bar, 56px menu row, mega-menu,
   mobile drawer, bottom nav) dressed in tabdealgold.ir styling. */

/* ---------- brand lock-up (tabdealgold.ir) */
.brand{display:flex;align-items:center;gap:10px;min-width:max-content}
.brand-mark{
  width:38px;height:38px;border-radius:13px;position:relative;flex-shrink:0;
  background:var(--grad-brand);box-shadow:0 10px 24px rgba(11,111,251,.20);
  display:grid;place-items:center;color:#fff;font-size:19px;font-weight:950;letter-spacing:-.5px;overflow:hidden;font-family:Arial,var(--font)
}
.brand-mark::before{content:"";position:absolute;inset:6px;border:2px solid rgba(255,214,107,.82);border-left:0;border-bottom:0;border-radius:7px;transform:rotate(45deg)}
.brand-mark span{position:relative;z-index:1;transform:translateY(1px)}
.brand-mark-sm{width:30px;height:30px;border-radius:10px;font-size:15px}
.brand-text{display:flex;flex-direction:column;line-height:1.2}
.brand-text b{font-size:19px;color:var(--blue-900);letter-spacing:-.6px;font-weight:900}
.brand-text small{font-size:11px;color:var(--gray-500);margin-top:2px}
.brand-text em{font-style:normal;color:var(--gold-600)}

/* ---------- header */
.site-header{position:sticky;top:0;z-index:9999}
.topbar{background:var(--grad-navy);color:#dbeafe;font-size:12px;border-bottom:1px solid rgba(255,255,255,.10)}
.topbar-in{height:var(--topbar-h);display:flex;align-items:center;justify-content:space-between;padding:0 40px;max-width:1920px;margin-inline:auto}
.live-price{display:inline-flex;align-items:center;gap:8px;color:#eaf3ff;white-space:nowrap}
.live-price .lp-value{font-size:14px;font-weight:800;color:var(--yellow-400)}
.live-price .lp-unit{color:#cfe0ff}
.lp-skel{display:inline-block;width:70px;height:18px;border-radius:999px;opacity:.35}
.top-links{display:flex;align-items:center;gap:24px}
.top-links a{color:#eaf3ff;transition:color .18s}
.top-links a:hover{color:var(--yellow-400)}

.mainbar{background:rgba(255,255,255,.88);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid rgba(234,236,240,.88);position:relative}
.mainbar-in{height:var(--header-h);display:flex;align-items:center;justify-content:space-between;gap:32px;padding-right:40px;padding-left:32px;max-width:1920px;margin-inline:auto}
.mb-right{display:flex;align-items:center;gap:32px;height:100%}
.mb-right nav{height:100%}
.logo{display:inline-flex;align-items:center}
.menu{display:flex;align-items:center;gap:28px;height:100%}
.menu>li{height:100%;display:flex;align-items:center;padding:0 6px}
.menu>li>a{display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:var(--gray-700);padding:8px 4px;transition:color .18s;height:100%}
.menu>li>a .caret{width:14px;height:14px;transition:transform .2s;color:var(--gray-400)}
.menu>li>a:hover,.menu>li>a.is-active,.menu>li:focus-within>a{color:var(--blue-700)}
.menu>li>a.is-active{font-weight:800}
.menu .menu-wallet{padding:0;border-inline:1px solid var(--gray-200)}
.menu .menu-wallet a{padding:0 28px;gap:12px;color:var(--gold-700);font-weight:800}
.menu .menu-wallet a svg{width:24px;height:24px;color:var(--gold-600)}
.menu .menu-wallet a:hover{color:var(--gold-600);background:linear-gradient(180deg,transparent,rgba(255,245,215,.6))}

/* mega menu */
.has-mega{position:static}
.mega{position:absolute;top:100%;right:0;left:0;background:#fff;box-shadow:0 18px 40px rgba(16,24,40,.10);border-top:1px solid var(--gray-200);border-radius:0 0 var(--radius-lg) var(--radius-lg);
  opacity:0;visibility:hidden;transform:translateY(-10px);transition:opacity .2s,transform .2s,visibility .2s;z-index:10}
.has-mega:hover .mega,.has-mega:focus-within .mega{opacity:1;visibility:visible;transform:none}
.has-mega:hover>a .caret{transform:rotate(180deg)}
.mega-in{max-width:1400px;margin-inline:auto;padding:24px 32px 28px;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:32px}
.mega-head{display:flex;align-items:center;gap:8px;margin-bottom:16px;font-size:13px;font-weight:800;color:var(--blue-900)}
.mega-head::before{content:"";width:4px;height:14px;border-radius:2px;background:var(--grad-gold);flex-shrink:0}
.mega-head svg{width:16px;height:16px;color:var(--gray-400);margin-right:auto}
.mega-head:hover{color:var(--blue-700)}
.mega-col ul{display:flex;flex-direction:column;gap:6px}
.mega-col li a{font-size:13px;color:var(--gray-600);transition:color .15s,padding .15s;display:inline-block;padding:2px 0}
.mega-col li a:hover{color:var(--blue-700);padding-right:4px}

/* header actions */
.mb-left{display:flex;align-items:center;gap:16px}
.mb-divider{width:1px;height:24px;background:var(--gray-200)}
.cart-btn{width:40px}
.cart-badge{position:absolute;top:-6px;right:-3px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:var(--red);color:#fff;font-size:10px;font-weight:800;display:grid;place-items:center;border:2px solid #fff;line-height:1}
.cart-badge[hidden]{display:none}

/* search */
.hsearch{position:relative;display:flex;align-items:center}
.hsearch-form{position:relative;width:0;opacity:0;overflow:visible;transition:width .3s ease,opacity .25s;pointer-events:none}
.hsearch.is-open .hsearch-form{width:350px;opacity:1;pointer-events:auto}
.hsearch.is-open .hs-toggle{display:none}
.hsearch-input{width:100%;height:40px;border:1px solid var(--gray-200);border-radius:14px;padding:0 40px;font-size:15px;background:var(--gray-50);outline:none;transition:border-color .18s,box-shadow .18s}
.hsearch-input:focus{border-color:var(--blue-500);background:#fff;box-shadow:0 0 0 4px rgba(11,111,251,.10)}
.hsearch-input::-webkit-search-cancel-button{display:none}
.hs-ic{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:var(--gray-400);display:flex}
.hs-ic svg{width:20px;height:20px}
.hs-clear{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--gray-500);display:flex}
.hs-clear svg{width:18px;height:18px}
.hsearch-results{position:absolute;top:calc(100% + 8px);right:0;left:0;background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius-md);box-shadow:var(--shadow-md);max-height:420px;overflow:auto;padding:6px;z-index:20}
.sr-row{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;transition:background .15s}
.sr-row:hover{background:var(--blue-50)}
.sr-row img{width:48px;height:48px;border-radius:10px;object-fit:cover;background:var(--gray-100)}
.sr-name{flex:1;font-size:13px;color:var(--gray-800);line-height:1.6}
.sr-price{font-size:12px;font-weight:800;color:var(--blue-700);white-space:nowrap}
.sr-price small{font-weight:400;color:var(--gray-500)}
.sr-all{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px;font-size:13px;font-weight:800;color:var(--blue-700);border-top:1px solid var(--gray-100);margin-top:4px}
.sr-all svg{width:16px;height:16px}
.sr-empty{padding:18px;text-align:center;color:var(--gray-500);font-size:13px}

/* user dropdown */
.user-menu{position:relative}
.user-btn.is-logged{color:var(--blue-700);background:var(--blue-50)}
.user-dd{position:absolute;top:calc(100% + 10px);left:0;width:215px;background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius-md);box-shadow:var(--shadow-md);overflow:hidden;opacity:0;visibility:hidden;transform:translateY(-6px);transition:.18s;z-index:20}
.user-menu.is-open .user-dd{opacity:1;visibility:visible;transform:none}
.user-dd .ud-head{display:flex;align-items:center;gap:8px;padding:14px 16px;background:var(--blue-50);color:var(--blue-900);font-weight:800;font-size:13px}
.user-dd .ud-head svg{width:20px;height:20px;color:var(--blue-700)}
.user-dd a,.user-dd button{display:flex;align-items:center;gap:10px;width:100%;padding:13px 16px;border-top:1px solid var(--gray-100);font-size:13px;color:var(--gray-700);transition:background .15s;text-align:right}
.user-dd a:hover,.user-dd button:hover{background:var(--gray-50);color:var(--blue-700)}
.user-dd svg{width:18px;height:18px}
.user-dd .ud-logout{color:var(--red)}

/* ---------- mobile header */
.mobilebar,.price-strip{display:none}
@media (max-width:1023.98px){
  .site-header{z-index:10000}
  .topbar,.mainbar{display:none}
  .mobilebar{display:flex;align-items:center;justify-content:space-between;height:56px;padding-inline:12px;background:rgba(255,255,255,.92);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid var(--gray-200)}
  .mobilebar .logo .brand-text b{font-size:17px}
  .mobilebar .brand-mark{width:32px;height:32px;border-radius:11px;font-size:16px}
  .mobilebar .icon-btn{color:var(--gray-700)}
  .price-strip{display:flex;align-items:center;gap:6px;height:30px;padding:4px 16px;background:var(--grad-navy);color:#eaf3ff;font-size:12px}
  .price-strip .lp-value{color:var(--yellow-400);font-weight:800;font-size:13px}
  .price-strip .lp-unit{color:#cfe0ff}
}

/* drawer */
.drawer{position:fixed;inset:0;background:#fff;z-index:10050;display:flex;flex-direction:column;transform:translateX(100%);transition:transform .3s ease;visibility:hidden}
.drawer.is-open{transform:none;visibility:visible}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--gray-200)}
.drawer-body{flex:1;overflow:auto;padding-bottom:24px}
.drawer-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:18px 16px;border-bottom:1px solid var(--gray-100);font-size:15px;font-weight:700;color:var(--gray-800);text-align:right}
.drawer-row>svg:last-child{width:18px;height:18px;color:var(--gray-400);transition:transform .27s}
.drawer-links .drawer-row{justify-content:flex-start;font-weight:600;font-size:14px}
.drawer-links .drawer-row svg{width:20px;height:20px;color:var(--gold-600)}
.drawer-wallet{justify-content:flex-start;color:var(--gold-700);background:linear-gradient(90deg,#fff,var(--yellow-100))}
.drawer-wallet svg{width:22px;height:22px;color:var(--gold-600)}
.drawer-acc.is-open>.drawer-row>svg:last-child{transform:rotate(180deg)}
.drawer-sub{display:none;background:var(--gray-50)}
.drawer-acc.is-open>.drawer-sub{display:block}
.drawer-sub>a{display:block;padding:12px 32px;font-size:14px;color:var(--gray-600);border-bottom:1px solid var(--gray-100)}
.drawer-sub>a.drawer-all{color:var(--blue-700);font-weight:700}
.drawer-acc-2>.drawer-row{padding-right:28px;font-size:14px;font-weight:600}
.drawer-acc-2 .drawer-sub>a{padding-right:44px;background:#fff}

/* mobile search overlay */
.msearch{position:fixed;inset:0;background:#fff;z-index:10050;display:none;flex-direction:column}
.msearch.is-open{display:flex}
.msearch-head{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--gray-200)}
.msearch-field{flex:1;display:flex;align-items:center;gap:8px;background:var(--gray-50);border:1px solid var(--gray-200);border-radius:14px;padding:0 12px;height:44px}
.msearch-field svg{width:20px;height:20px;color:var(--gray-400)}
.msearch-field input{flex:1;border:0;background:transparent;outline:none;font-size:15px;height:100%}
.msearch-results{flex:1;overflow:auto;padding:8px 12px}
.msearch-results .sr-row img{width:56px;height:56px}

/* ---------- footer (tabdealgold.ir footer styling, Remas structure) */
.site-footer{background:#fff;border-top:1px solid var(--gray-200)}
.footer-in{max-width:1360px;margin-inline:auto;padding:80px 16px 24px;display:flex;flex-direction:column;gap:48px}
.footer-top{display:flex;justify-content:space-between;gap:40px}
.footer-links{flex:1;display:grid;grid-template-columns:repeat(4,1fr);gap:32px 24px}
.foot-col{display:flex;flex-direction:column;gap:18px}
.foot-col h2,.footer-contact h2{font-size:16px;font-weight:800;color:var(--blue-900);margin-bottom:2px}
.foot-col a{font-size:15px;color:var(--gray-600);transition:color .15s}
.foot-col a:hover{color:var(--blue-700)}
.footer-contact{width:290px;display:flex;flex-direction:column;gap:22px;flex-shrink:0}
.socials{display:flex;gap:10px}
.socials a{width:38px;height:38px;border-radius:12px;background:var(--gray-100);display:grid;place-items:center;color:var(--gray-600);transition:.18s}
.socials a:hover{background:var(--blue-100);color:var(--blue-700)}
.socials svg{width:20px;height:20px}
.fc-row{display:flex;flex-direction:column;gap:8px}
.fc-label{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--gray-700)}
.fc-label svg{width:16px;height:16px;color:var(--gold-600)}
.fc-row p{font-size:12px;color:var(--gray-500);line-height:1.9}
.map-badges{display:flex;gap:8px}
.map-badge{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;border:1px solid var(--gray-200);border-radius:12px;font-size:12px;font-weight:700;color:var(--gray-700)}
.map-badge svg{width:16px;height:16px;color:var(--blue-600)}
.fc-hours{display:flex;gap:24px}
.fc-hours div{display:flex;flex-direction:column;gap:2px}
.fc-hours span{font-size:12px;color:var(--gray-500)}
.fc-hours b{font-size:14px;color:var(--blue-900)}
.fc-mail{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--gray-600)}
.fc-mail svg{width:18px;height:18px;color:var(--gold-600)}
.footer-bottom{display:flex;flex-direction:column;gap:32px}
.footer-about{display:flex;align-items:center;gap:48px}
.footer-logo{display:flex;flex-direction:column;align-items:center;gap:8px;flex-shrink:0;width:104px}
.footer-logo .brand-mark{width:64px;height:64px;border-radius:20px;font-size:32px}
.footer-logo .brand-mark::before{inset:10px;border-radius:10px}
.footer-logo>span:last-child{font-size:18px;font-weight:900;color:var(--blue-900)}
.footer-logo em{font-style:normal;color:var(--gold-600)}
.footer-about p{flex:1;font-size:14px;color:var(--gray-500);line-height:2}
.trust{flex-shrink:0;display:flex;gap:8px}
.trust .pending-body{display:flex;gap:8px}
.trust-tile{width:88px;height:88px;border:1px solid var(--gray-200);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;background:#fff;overflow:hidden;scroll-margin-top:140px}
.trust-tile>a{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.trust-tile img{width:80px;height:80px;object-fit:contain}
.seal-ph{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;font-weight:700;color:var(--blue-900);text-align:center}
.seal-ph svg{width:30px;height:30px;color:var(--gold-600)}
.app-bar{background:linear-gradient(135deg,var(--blue-900),var(--blue-700) 68%,var(--gold-600));border-radius:var(--radius-lg);min-height:72px;padding:12px 12px 12px 12px;padding-right:24px;display:flex;align-items:center;justify-content:space-between;gap:16px;position:relative;overflow:hidden;box-shadow:var(--shadow-blue)}
.app-bar::before{content:"";position:absolute;left:-90px;bottom:-140px;width:300px;height:300px;border-radius:50%;background:rgba(255,214,107,.18)}
.app-bar h2{font-size:18px;font-weight:900;color:#fff;position:relative}
.app-pills{display:flex;gap:8px;flex-wrap:wrap;position:relative}
.app-pill{display:inline-flex;align-items:center;gap:8px;height:48px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.10);border-radius:15px;padding:0 16px;color:#fff;font-weight:800;font-size:13px;transition:.18s}
.app-pill:hover{background:rgba(255,255,255,.18)}
.app-pill svg{width:20px;height:20px;color:var(--yellow-400)}
.copyright{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px;color:var(--gray-500);text-align:center;padding-top:20px;border-top:1px solid var(--gray-200)}

@media (max-width:1366px){
  .footer-about{flex-wrap:wrap;gap:24px}
  .footer-about p{flex-basis:calc(100% - 140px)}
}
@media (max-width:1024px){
  .footer-top{flex-direction:column}
  .footer-links{grid-template-columns:repeat(3,1fr)}
  .footer-contact{width:100%}
}
@media (max-width:768px){
  .footer-in{padding:40px 16px 24px;gap:32px}
  .footer-links{grid-template-columns:repeat(2,1fr)}
  .foot-col a{font-size:14px}
  .footer-about{flex-direction:column;align-items:flex-start}
  .trust{width:100%;display:grid;grid-template-columns:repeat(5,1fr)}
  .trust-pending{grid-column:span 4}
  .trust .pending-body{display:grid;grid-template-columns:repeat(4,1fr)}
  .trust-tile{width:auto;height:auto;aspect-ratio:1}
  .trust-tile img{width:90%;height:90%}
  .seal-ph{font-size:9px}
  .seal-ph svg{width:22px;height:22px}
  .app-bar{flex-direction:column;align-items:stretch;text-align:center;padding:20px 16px}
  .app-pills{justify-content:center}
  .app-pill{flex:1;justify-content:center;min-width:140px}
}

/* ---------- bottom nav */
.bottom-nav{display:none}
@media (max-width:767.98px){
  .bottom-nav{position:fixed;right:0;left:0;bottom:0;z-index:9000;height:calc(64px + env(safe-area-inset-bottom));padding:8px 12px calc(8px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.96);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--gray-200);box-shadow:0 -2px 12px rgba(16,24,40,.06);
    display:flex;gap:8px;animation:bnUp .25s ease both}
  .bn-item{flex:1;height:48px;border-radius:14px;display:grid;place-items:center;color:var(--gray-500);position:relative;transition:.18s}
  .bn-item svg{width:24px;height:24px}
  .bn-item.is-active{background:var(--blue-50);color:var(--blue-700)}
  .bn-item.is-active::after{content:"";position:absolute;bottom:5px;width:4px;height:4px;border-radius:50%;background:var(--blue-700)}
  .bn-item .cart-badge{top:4px;right:calc(50% - 22px)}
  .site-footer{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
}
@keyframes bnUp{from{transform:translateY(80px)}to{transform:none}}
