/* ===== Polaris web shop ===== */
.shop-page .page__body{padding-top:0;padding-bottom:64px}
.shop-root{min-height:420px}
.shop-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:80px 24px;color:var(--muted)}
.shop-loading i{font-size:28px;color:var(--brand);animation:shopSpin 1s linear infinite}
@keyframes shopSpin{to{transform:rotate(360deg)}}

.shop-hero{padding:48px 0 32px;text-align:center;border-bottom:1px solid var(--line);margin-bottom:32px}
.shop-hero h1{font-size:clamp(28px,4vw,40px);font-weight:800;color:var(--navy);margin-bottom:12px}
.shop-hero p{color:var(--muted);max-width:640px;margin:0 auto;font-size:15px;line-height:1.9}

.shop-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:28px}
.shop-toolbar__count{font-size:14px;color:var(--muted)}
.shop-toolbar__sort select{padding:10px 14px;border:1px solid var(--line);background:#fff;font-family:inherit;font-size:13px;min-width:180px}

.shop-search{position:relative;max-width:360px;width:100%}
.shop-search input{width:100%;padding:12px 44px 12px 16px;border:1px solid var(--line);font-family:inherit;font-size:14px}
.shop-search i{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:var(--muted)}

.shop-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--line);border-right:1px solid var(--line)}
.shop-card{background:#fff;border-bottom:1px solid var(--line);border-left:1px solid var(--line);display:flex;flex-direction:column;position:relative;overflow:hidden;transition:box-shadow var(--t)}
.shop-card:hover{z-index:2;box-shadow:var(--shadow-lg)}
.shop-card__media{position:relative;height:260px;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 42%,#fff 0%,#e9eef2 100%);padding:16px}
.shop-card__media img{max-height:100%;width:auto;object-fit:contain;transition:transform .5s var(--ease)}
.shop-card:hover .shop-card__media img{transform:scale(1.05)}
.shop-card__badge{position:absolute;top:0;right:0;background:var(--brand);color:#fff;font-size:11px;font-weight:700;padding:6px 12px;z-index:2}
.shop-card__surface{display:flex;flex-direction:column;flex:1;color:inherit;text-decoration:none;min-height:0;cursor:pointer}
.shop-card__surface:hover .shop-card__title{color:var(--brand-dark)}
.shop-card__main{padding:24px;display:flex;flex-direction:column;flex:1}
.shop-card__cat{font-size:12px;color:var(--brand-dark);margin-bottom:6px}
.shop-card__title{font-size:18px;font-weight:700;color:var(--navy);margin-bottom:8px;line-height:1.5;transition:color var(--t)}
.shop-card__model{display:block;font-size:12px;color:var(--muted);letter-spacing:.5px;font-family:Arial,sans-serif;margin-bottom:6px}
.shop-card__short{color:var(--muted);font-size:13.5px;line-height:1.85;flex:1;margin-bottom:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.shop-card__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 24px 24px;border-top:1px solid var(--line);margin-top:auto}
.shop-card__foot--solo{justify-content:flex-start}
.shop-card__pricing{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;color:inherit;text-decoration:none}
.shop-card__pricing:hover .shop-card__price{color:var(--brand-dark)}
.shop-card__price{font-size:16px;font-weight:800;color:var(--navy);transition:color var(--t)}
.shop-card__price small{font-size:12px;font-weight:500;color:var(--muted)}
.shop-card__price-old{font-size:12px;color:var(--muted);text-decoration:line-through;display:block;margin-bottom:2px}
.shop-card__btn{flex-shrink:0;padding:10px 14px;border:0;background:var(--navy);color:#fff;font-family:inherit;font-size:11.5px;font-weight:600;cursor:pointer;transition:var(--t);display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.shop-card__btn:hover{background:var(--brand)}
.shop-card__btn.is-added{background:var(--brand-dark)}
.shop-card__btn.is-oos,.btn.is-oos{background:#94a3b8;cursor:not-allowed;opacity:.9}
.shop-card__btn.is-oos:hover,.btn.is-oos:hover{background:#94a3b8}

.shop-empty{text-align:center;padding:80px 24px;color:var(--muted)}
.shop-empty i{font-size:48px;color:var(--line);margin-bottom:16px}

/* Product detail */
.product-view{display:grid;grid-template-columns:1fr 1fr;gap:48px;padding:48px 0}
.product-view__media{background:radial-gradient(circle at 50% 42%,#fff 0%,#e9eef2 100%);border:1px solid var(--line);min-height:420px;display:flex;align-items:center;justify-content:center;padding:24px}
.product-view__media img{max-width:100%;max-height:480px;object-fit:contain}
.product-view__badges{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.product-view__badge{font-size:12px;padding:6px 12px;background:var(--brand);color:#fff;font-weight:600}
.product-view__badge--model{background:var(--navy)}
.product-view__title{font-size:clamp(24px,3vw,32px);font-weight:800;color:var(--navy);margin-bottom:12px;line-height:1.4}
.product-view__sku{font-size:13px;color:var(--muted);margin-bottom:16px}
.product-view__short{color:var(--muted);line-height:1.95;margin-bottom:24px;font-size:15px}
.product-view__price-box{margin-bottom:24px;padding:20px;background:#f7f9fb;border:1px solid var(--line)}
.product-view__price{font-size:28px;font-weight:800;color:var(--navy)}
.product-view__price small{font-size:14px;font-weight:500;color:var(--muted)}
.product-view__price-old{font-size:14px;color:var(--muted);text-decoration:line-through;margin-bottom:4px}
.product-view__specs{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:28px}
.product-view__spec{padding:14px;border:1px solid var(--line);background:#fff;font-size:13px}
.product-view__spec b{display:block;font-size:15px;color:var(--navy);margin-bottom:4px}
.product-view__spec span{color:var(--muted)}
.product-view__qty{display:inline-flex;align-items:center;border:1px solid var(--line);margin-left:12px}
.product-view__qty button{width:40px;height:40px;border:0;background:#fff;cursor:pointer;font-size:18px}
.product-view__qty span{min-width:40px;text-align:center;font-weight:700}
.product-view__actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.product-view__desc{margin-top:40px;padding-top:32px;border-top:1px solid var(--line)}
.product-view__desc h2{font-size:20px;margin-bottom:16px;color:var(--navy)}
.product-view__desc p{color:var(--muted);line-height:2}
.product-view__desc-body{color:var(--ink);line-height:1.9;font-size:14px}
.product-view__desc-body h2{font-size:18px;margin:28px 0 12px;color:var(--navy)}
.product-view__desc-body h3{font-size:15px;margin:22px 0 10px;color:var(--navy);font-weight:800}
.product-view__desc-body p{margin:0 0 12px;color:var(--muted);line-height:1.95}
.product-rich__lead{font-size:14px;color:var(--ink)!important}
.product-rich__note{
  margin:14px 0;padding:12px 14px;border-inline-start:3px solid var(--brand);
  background:var(--brand-light,#e8f6fc);color:var(--navy)!important;border-radius:0 10px 10px 0;
}
.product-rich__list{margin:0 0 16px;padding:0;list-style:none}
.product-rich__list li{
  position:relative;padding:8px 0 8px 0;padding-inline-start:18px;
  border-bottom:1px solid var(--line-soft,#eef3f7);color:var(--muted);line-height:1.7;
}
.product-rich__list li::before{
  content:"";position:absolute;inset-inline-start:0;top:15px;
  width:7px;height:7px;border-radius:50%;background:var(--brand);
}
.product-rich__list li b{color:var(--navy);font-weight:800}
.product-rich__list a{color:var(--brand-dark);font-weight:700}
.product-spec-tables{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;margin-top:20px;
}
.product-spec-table{
  width:100%;border-collapse:collapse;background:#fff;
  border:1px solid var(--line);border-radius:12px;overflow:hidden;
  font-size:13px;
}
.product-spec-table caption{
  caption-side:top;text-align:start;font-size:14px;font-weight:800;
  color:#fff;background:linear-gradient(135deg,var(--navy),#143652);
  padding:12px 14px;margin:0;
}
.product-spec-table th,
.product-spec-table td{
  padding:10px 14px;border-bottom:1px solid var(--line-soft,#eef3f7);
  vertical-align:top;line-height:1.55;
}
.product-spec-table tr:last-child th,
.product-spec-table tr:last-child td{border-bottom:0}
.product-spec-table th{
  width:46%;font-weight:700;color:var(--navy);background:#f7fafc;
  text-align:start;
}
.product-spec-table td{color:var(--muted);font-weight:600}
.product-spec-table tr:nth-child(even) td{background:#fcfdfe}
@media(max-width:640px){
  .product-spec-tables{grid-template-columns:1fr}
}
.product-related{margin-top:48px;padding-top:32px;border-top:1px solid var(--line)}
.product-related h2{font-size:22px;margin-bottom:24px;color:var(--navy)}

/* Cart */
.cart-view{padding:48px 0}
.cart-view__head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:32px;flex-wrap:wrap}
.cart-view__head h1{font-size:28px;font-weight:800;color:var(--navy)}
.cart-view__grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:28px;align-items:start}
.cart-view__main{min-width:0}
.cart-list{display:flex;flex-direction:column;gap:0;border:1px solid var(--line)}
.cart-row{display:grid;grid-template-columns:100px 1fr auto auto;gap:20px;align-items:center;padding:20px;background:#fff;border-bottom:1px solid var(--line)}
.cart-row:last-child{border-bottom:0}
.cart-row__img{width:100px;height:80px;display:flex;align-items:center;justify-content:center;background:#f7f9fb;border:1px solid var(--line)}
.cart-row__img img{max-width:100%;max-height:100%;object-fit:contain}
.cart-row__name{font-size:16px;font-weight:700;color:var(--navy);margin-bottom:4px}
.cart-row__sku{font-size:12px;color:var(--muted)}
.cart-row__price{font-weight:700;color:var(--navy);white-space:nowrap}
.cart-row__qty{display:inline-flex;border:1px solid var(--line)}
.cart-row__qty button,.cart-row__qty span{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:0;background:#fff;cursor:pointer}
.cart-row__remove{border:0;background:none;color:var(--muted);cursor:pointer;padding:8px;font-size:16px}
.cart-row__remove:hover{color:#c0392b}
.cart-summary{
  position:sticky;top:96px;margin:0;padding:24px;border:1px solid var(--line);background:#f7f9fb;
}
.cart-summary__title{font-size:17px;font-weight:800;color:var(--navy);margin-bottom:16px}
.cart-summary__checkout{display:block;width:100%;margin-top:16px;text-align:center}
.cart-view__shop-note{
  margin:24px 0 0;font-size:14px;line-height:1.9;color:var(--muted);text-align:right;
}
.cart-view__shop-note a{color:var(--brand);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.cart-view__shop-note a:hover{color:var(--navy)}
.cart-summary__row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;font-size:14px}
.cart-summary__row--shipping{align-items:flex-start}
.cart-summary__row--shipping span:last-child{max-width:62%;text-align:left;font-size:12px;line-height:1.8;color:var(--muted);font-weight:600}
.cart-summary__row--total{font-size:18px;font-weight:800;color:var(--navy);border-top:1px solid var(--line);margin-top:8px;padding-top:16px}
.cart-summary__note{font-size:13px;color:var(--brand-dark);margin:12px 0}
.cart-empty{text-align:center;padding:64px 24px}
.cart-empty i{font-size:56px;color:var(--line);margin-bottom:20px}

/* Checkout — customer info & payment */
.checkout-view{padding:48px 0}
.checkout-view__head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.checkout-view__back{
  display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border:1px solid var(--line);
  background:#fff;color:var(--navy);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;
  transition:border-color var(--t),color var(--t),background var(--t);
}
.checkout-view__back:hover{border-color:var(--brand);color:var(--brand);background:#f7f9fb}
.checkout-view__back--inline{margin-right:auto}
.checkout-view__head h1{font-size:28px;font-weight:800;color:var(--navy)}
.checkout-view__intro{color:var(--muted);font-size:14px;line-height:1.9;margin-bottom:28px}
.checkout-buyer{
  margin-bottom:24px;padding:18px 20px;border:1px solid var(--line);background:#f7f9fb;
}
.checkout-buyer__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.checkout-buyer__head h2{font-size:16px;font-weight:800;color:var(--navy);margin:0}
.checkout-buyer__edit{
  border:0;background:none;padding:0;font:inherit;font-size:13px;font-weight:700;color:var(--brand);
  cursor:pointer;text-decoration:underline;text-underline-offset:3px;
}
.checkout-buyer__edit:hover{color:var(--navy)}
.checkout-buyer__meta{margin:0}
.checkout-buyer__row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0;border-top:1px solid var(--line)}
.checkout-buyer__row:first-child{border-top:0}
.checkout-buyer__row dt{font-size:13px;color:var(--muted);margin:0}
.checkout-buyer__row dd{margin:0;font-size:14px;font-weight:700;color:var(--navy)}
.profile-edit-card{
  padding:24px;border:1px solid var(--line);background:#fff;margin-bottom:16px;
}
.profile-edit-card h2{font-size:18px;font-weight:800;color:var(--navy);margin-bottom:8px}
.profile-edit-card__note{font-size:13px;color:var(--muted);margin-bottom:18px;line-height:1.85}
.profile-edit-form .btn{margin-top:8px}
.profile-edit-form .checkout-field input.is-readonly,
.profile-edit-form .checkout-field input:disabled,
.profile-edit-form .checkout-field input[readonly],
#profilePhone{
  background:#dce3e8 !important;
  color:#6b7c88 !important;
  cursor:not-allowed !important;
  border-color:#c5d0d9 !important;
  opacity:1 !important;
  -webkit-text-fill-color:#6b7c88 !important;
  box-shadow:none !important;
}
.profile-edit-form .checkout-field input.is-readonly:focus,
.profile-edit-form .checkout-field input:disabled:focus,
#profilePhone:focus{
  border-color:#c5d0d9 !important;box-shadow:none !important;outline:none !important;
}
.profile-edit-form .checkout-field:has(#profilePhone) label{color:var(--muted)}
.profile-menu__signout{margin:0}
.profile-menu__signout .profile-menu__item{width:100%}
.checkout-view__grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:28px;align-items:start}
.checkout-form{background:#fff;border:1px solid var(--line);padding:28px 24px;box-shadow:var(--shadow)}
.checkout-form__section{margin-bottom:28px}
.checkout-form__section:last-of-type{margin-bottom:0}
.checkout-form__section h2{font-size:18px;font-weight:800;color:var(--navy);margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.checkout-form__row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.checkout-field{margin-bottom:14px}
.checkout-field label{display:block;font-size:13px;font-weight:600;color:var(--navy);margin-bottom:8px}
.checkout-field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.checkout-field select,.checkout-field textarea{
  width:100%;padding:12px 14px;border:1px solid var(--line);background:#fff;
  font-family:inherit;font-size:14px;color:var(--ink);transition:border-color var(--t);
}
.checkout-field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):focus,
.checkout-field select:focus,.checkout-field textarea:focus{
  outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(22,166,219,.12);
}
.checkout-field.is-invalid label{color:#dc3545}
.checkout-field.is-invalid input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.checkout-field.is-invalid select,
.checkout-field.is-invalid textarea,
.checkout-receipt.is-invalid input[type="file"]{
  border-color:#dc3545;background:#fff5f5;
}
.checkout-field.is-invalid input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):focus,
.checkout-field.is-invalid select:focus,
.checkout-field.is-invalid textarea:focus,
.checkout-receipt.is-invalid input[type="file"]:focus{
  border-color:#dc3545;box-shadow:0 0 0 3px rgba(220,53,69,.12);
}
.checkout-field__error{
  display:none;margin-top:6px;font-size:12px;color:#dc3545;line-height:1.7;font-weight:600;
}
.checkout-field.is-invalid .checkout-field__error,
.checkout-receipt.is-invalid .checkout-field__error{display:block}
.checkout-receipt.is-invalid{border-color:#dc3545;background:#fff5f5}
.checkout-pay{display:flex;flex-direction:column;gap:10px}
.checkout-pay__item{
  display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border:1px solid var(--line);
  background:#f7f9fb;cursor:pointer;transition:border-color var(--t),background var(--t);
}
.checkout-pay__item:has(input:checked){border-color:var(--brand);background:#eef9fd}
.checkout-pay__item input[type="radio"]{
  width:auto;min-width:18px;height:18px;margin:2px 0 0;padding:0;border:none;background:transparent;
  box-shadow:none;flex-shrink:0;accent-color:var(--brand);cursor:pointer;
}
.checkout-pay__item input[type="radio"]:focus{outline:none;box-shadow:0 0 0 3px rgba(22,166,219,.2)}
.checkout-pay__item span{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.checkout-pay__item b{font-size:14px;color:var(--navy)}
.checkout-pay__item small{font-size:12px;color:var(--muted)}
.checkout-receipt{margin-top:16px;padding:16px;border:1px dashed var(--line);background:#fff}
.checkout-receipt[hidden]{display:none !important}
.checkout-sayadi .checkout-field{margin-bottom:16px}
.checkout-sayadi .checkout-field:last-child{margin-bottom:0}
.checkout-receipt__req{color:#dc3545}
.checkout-receipt__hint{margin-top:8px;font-size:12px;color:var(--muted);line-height:1.8}
.checkout-receipt input[type="file"]{
  width:100%;padding:10px;border:1px solid var(--line);background:#f7f9fb;font-family:inherit;font-size:13px;
}
.checkout-receipt__preview{margin-top:12px}
.checkout-receipt__preview img{max-width:100%;max-height:220px;border:1px solid var(--line);background:#fff}
.checkout-receipt__file{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--navy);font-weight:600}
.checkout-receipt__file i{color:#c0392b;font-size:18px}
.checkout-form__submit{width:100%;margin-top:24px}
.checkout-summary{
  position:sticky;top:96px;background:#f7f9fb;border:1px solid var(--line);padding:24px;
}
.checkout-summary h3{font-size:17px;font-weight:800;color:var(--navy);margin-bottom:16px}
.checkout-summary__note{margin-top:14px;font-size:13px;line-height:1.9;color:var(--muted)}
.checkout-success{text-align:center;padding:72px 24px;max-width:520px;margin:0 auto}
.checkout-success__icon{
  width:80px;height:80px;margin:0 auto 24px;border-radius:50%;background:#ecfdf5;color:#059669;
  display:flex;align-items:center;justify-content:center;font-size:34px;
}
.checkout-success h1{font-size:28px;font-weight:800;color:var(--navy);margin-bottom:12px}
.checkout-success p{color:var(--muted);line-height:1.9;margin-bottom:20px}
.checkout-success__order{font-size:15px;color:var(--navy);margin-bottom:28px}
.checkout-success__order b{color:var(--brand)}

/* Profile / account */
.profile-view{padding:48px 0;max-width:640px;margin:0 auto}
.profile-view__hero{display:flex;align-items:center;gap:20px;padding:28px;background:#f7f9fb;border:1px solid var(--line);margin-bottom:24px}
.profile-view__avatar{width:72px;height:72px;display:flex;align-items:center;justify-content:center;background:var(--navy);color:#fff;font-size:28px;flex-shrink:0}
.profile-view__hero h1{font-size:24px;font-weight:800;color:var(--navy);margin-bottom:8px}
.profile-view__hero p{color:var(--muted);font-size:14px;line-height:1.85}
.profile-view__login{padding:24px;border:1px solid var(--line);background:#fff;margin-bottom:16px;text-align:center}
.profile-view__login .btn{width:100%;max-width:320px}
.profile-view__login-note{margin-top:14px;font-size:13px;color:var(--muted);line-height:1.85}
.profile-menu{display:flex;flex-direction:column;border:1px solid var(--line);background:#fff}
.profile-menu__item{display:flex;align-items:center;gap:14px;padding:18px 20px;border:0;border-bottom:1px solid var(--line);background:#fff;font-family:inherit;font-size:15px;font-weight:600;color:var(--ink);cursor:pointer;text-align:right;text-decoration:none;transition:background var(--t)}
.profile-menu__item:last-child{border-bottom:0}
.profile-menu__item:hover{background:#f7f9fb}
.profile-menu__item i:first-child{width:22px;color:var(--brand-dark);text-align:center}
.profile-menu__item span{flex:1}
.profile-menu__item i:last-child{color:var(--muted);font-size:12px}

/* Header cart */
/* Header cart — moved to fixed .cart-fab in web-styles */
/* Toast */
.shop-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(120px);background:var(--navy);color:#fff;padding:14px 22px;border-radius:4px;display:flex;align-items:center;gap:10px;font-size:14px;z-index:9999;opacity:0;transition:transform .35s var(--ease),opacity .35s var(--ease);pointer-events:none}
.shop-toast.is-visible{transform:translateX(-50%) translateY(0);opacity:1}
.shop-toast i{color:#6ee7a0}

@media (max-width:992px){
  .shop-grid{grid-template-columns:repeat(2,1fr)}
  .product-view{grid-template-columns:1fr;gap:32px}
  .cart-row{grid-template-columns:80px 1fr;grid-template-rows:auto auto}
  .cart-row__price,.cart-row__qty{grid-column:2}
  .cart-view__grid,.checkout-view__grid{grid-template-columns:1fr}
  .checkout-form__row{grid-template-columns:1fr}
  .cart-summary,.checkout-summary{position:static}
}
@media (max-width:640px){
  .shop-grid{grid-template-columns:1fr}
  .product-view__specs{grid-template-columns:1fr}
}
