/* Shared styles for the shop / order system pages */
:root{
  --sky:#3aa9d1; --sky-light:#e8f5fb; --sky-pale:#f4fafd;
  --sky-deep:#1f7fa6; --navy:#1a3a52;
  --accent:#e8a93a;
  --text:#2a3b48; --muted:#728695; --line:#e3eef4; --white:#fff; --bg:#fbfdfe;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Noto Sans JP',sans-serif;color:var(--text);background:var(--bg);line-height:1.85;letter-spacing:0.02em}
a{color:inherit;text-decoration:none}

.shop-topbar{
  position:sticky;top:0;z-index:100;
  background:var(--navy);padding:0 32px;height:64px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.shop-brand{display:flex;align-items:center;gap:12px}
.shop-brand-mark{
  width:36px;height:36px;border-radius:50%;
  background:linear-gradient(135deg,var(--sky),var(--sky-deep));
  color:#fff;font-weight:700;font-size:16px;
  display:flex;align-items:center;justify-content:center;
}
.shop-brand-text{color:#fff}
.shop-brand-name{font-size:14px;font-weight:700;letter-spacing:0.05em}
.shop-brand-sub{font-size:10px;color:rgba(255,255,255,0.65);letter-spacing:0.15em}
.shop-nav{display:flex;align-items:center;gap:12px}
.shop-nav-link{
  color:rgba(255,255,255,0.85);font-size:13px;font-weight:500;
  padding:8px 14px;border-radius:6px;transition:background 0.2s;
}
.shop-nav-link:hover{background:rgba(255,255,255,0.08);color:#fff}
.shop-nav-link.active{background:rgba(255,255,255,0.12);color:#fff}
.shop-cart-btn,
.shop-home-btn{
  position:relative;display:inline-flex;align-items:center;gap:6px;
  background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.25);
  color:#fff;font-size:12px;font-weight:700;letter-spacing:0.06em;
  padding:8px 14px;border-radius:24px;transition:background 0.2s;
  white-space:nowrap;flex-shrink:0;text-decoration:none;
}
.shop-cart-btn:hover,
.shop-home-btn:hover{background:rgba(255,255,255,0.18)}
.shop-home-icon{font-size:14px;line-height:1}
.shop-cart-badge{
  background:var(--accent);color:var(--navy);font-size:11px;font-weight:700;
  min-width:20px;height:20px;padding:0 6px;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;
}
.shop-logout{
  background:none;border:1px solid rgba(255,255,255,0.30);color:#fff;
  font-family:inherit;font-size:11px;font-weight:600;letter-spacing:0.08em;
  padding:6px 14px;border-radius:6px;cursor:pointer;transition:all 0.2s;
  white-space:nowrap;flex-shrink:0;
}
.shop-nav{flex-shrink:0}
.shop-logout:hover{border-color:var(--sky);color:var(--sky)}

.crumbs{background:#fff;border-bottom:1px solid var(--line);padding:12px 32px;font-size:12px;color:var(--muted)}
.crumbs a{color:var(--sky-deep);font-weight:600}
.crumbs span{margin:0 8px;color:#c4d0d9}

.vendor-hero{background:linear-gradient(135deg,var(--sky-pale) 0%,#dff0f9 100%);padding:36px 32px;border-bottom:1px solid var(--line)}
.vendor-hero-inner{max-width:1120px;margin:0 auto;display:grid;grid-template-columns:auto 1fr;gap:24px;align-items:center}
.vendor-hero-logo{
  width:80px;height:80px;border-radius:50%;
  background:#fff;border:2px solid var(--sky);
  display:flex;align-items:center;justify-content:center;
  font-size:36px;flex-shrink:0;
}
.vendor-hero h1{font-size:22px;font-weight:700;color:var(--navy);margin-bottom:4px}
.vendor-hero-tag{
  display:inline-block;background:var(--sky);color:#fff;
  font-size:10px;font-weight:700;letter-spacing:0.14em;
  padding:3px 10px;border-radius:10px;margin-bottom:8px;
}
.vendor-hero p{font-size:13px;color:var(--muted);line-height:1.85}

.shop-main{max-width:1200px;margin:0 auto;padding:36px 32px 100px}

.cat-block{margin-bottom:44px}
.cat-block h2{
  font-size:18px;font-weight:700;color:var(--navy);
  padding-bottom:10px;border-bottom:2px solid var(--sky);
  margin-bottom:20px;display:inline-block;
}

.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:18px}
.product{
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:18px 18px 16px;
  display:flex;flex-direction:column;
  transition:box-shadow 0.2s,border-color 0.2s;
}
.product:hover{border-color:var(--sky);box-shadow:0 10px 24px rgba(31,127,166,0.10)}
.product-img{
  aspect-ratio:1/1;border-radius:8px;overflow:hidden;
  background:var(--sky-pale);margin-bottom:14px;
  display:flex;align-items:center;justify-content:center;
  position:relative;
}
.product-img.linkable{cursor:pointer;transition:transform 0.2s}
.product-img.linkable:hover{transform:scale(1.02)}
.product-img.linkable::after{
  content:'🔍 詳細';
  position:absolute;top:8px;right:8px;
  background:rgba(0,0,0,0.55);color:#fff;
  font-size:10px;font-weight:600;letter-spacing:0.04em;
  padding:3px 8px;border-radius:12px;
  opacity:0;transition:opacity 0.2s;
  pointer-events:none;
}
.product-img.linkable:hover::after{opacity:1}
.product-name.linkable{cursor:pointer;transition:color 0.15s}
.product-name.linkable:hover{color:var(--sky-deep);text-decoration:underline}
.product-img img{width:100%;height:100%;object-fit:cover;display:block}
.product-tag{
  display:inline-block;font-size:10px;font-weight:700;
  color:var(--sky-deep);background:var(--sky-pale);
  padding:3px 8px;border-radius:6px;margin-bottom:8px;letter-spacing:0.06em;
  align-self:flex-start;
}
.product-name{
  font-size:14px;font-weight:700;color:var(--navy);
  line-height:1.5;margin-bottom:4px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  min-height:42px;
}
.product-size{font-size:11px;color:var(--muted);margin-bottom:10px}
.product-price{margin-top:auto;padding-top:8px}
.product-price-value{font-size:20px;font-weight:700;color:#c53030;letter-spacing:0.02em}
.product-price-value.tbd{font-size:14px;color:var(--muted)}
.product-price-tax{font-size:10px;color:var(--muted);margin-left:4px}
.product-actions{margin-top:12px;display:flex;gap:8px}
.qty-input{
  width:56px;padding:8px 6px;border:1px solid var(--line);
  border-radius:6px;font-family:inherit;font-size:13px;
  text-align:center;color:var(--text);outline:none;
}
.qty-input:focus{border-color:var(--sky)}
.btn-add{
  flex:1;background:var(--accent);color:var(--navy);
  border:none;border-radius:6px;font-family:inherit;font-size:12px;font-weight:700;
  padding:0 14px;cursor:pointer;letter-spacing:0.06em;
  transition:background 0.2s,transform 0.1s;
}
.btn-add:hover{background:#d99928}
.btn-add:active{transform:scale(0.97)}
.btn-add:disabled{background:#e0e5ea;color:#a0b0bc;cursor:not-allowed}

.footer-mini{background:#f2f6f9;padding:24px 32px;text-align:center;font-size:11px;color:var(--muted);letter-spacing:0.08em}

/* --- Product detail modal --- */
#shop-modal{
  position:fixed;inset:0;z-index:9999;
  display:none;align-items:center;justify-content:center;
  padding:24px;
}
#shop-modal.open{display:flex}
.shop-modal-backdrop{
  position:absolute;inset:0;background:rgba(15,24,35,0.55);
  backdrop-filter:blur(3px);
  animation:pmFade 0.2s ease-out;
}
.shop-modal-panel{
  position:relative;background:#fff;border-radius:16px;
  max-width:760px;width:100%;max-height:92vh;overflow-y:auto;
  box-shadow:0 30px 80px rgba(0,0,0,0.35);
  animation:pmSlide 0.25s ease-out;
}
@keyframes pmFade{from{opacity:0}to{opacity:1}}
@keyframes pmSlide{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
.shop-modal-close{
  position:absolute;top:12px;right:14px;z-index:2;
  width:36px;height:36px;border-radius:50%;
  background:#fff;border:1px solid var(--line);
  color:var(--muted);font-size:22px;line-height:1;font-family:inherit;
  cursor:pointer;transition:all 0.2s;
}
.shop-modal-close:hover{background:var(--sky-pale);color:var(--navy)}
.pm-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:0;
}
.pm-img{
  background:var(--sky-pale);
  display:flex;align-items:center;justify-content:center;
  border-radius:16px 0 0 16px;overflow:hidden;
  min-height:340px;
}
.pm-img img{width:100%;height:100%;object-fit:cover;display:block}
.pm-noimg{font-size:80px;color:#c4d0d9}
.pm-info{padding:36px 32px}
.pm-tag{
  display:inline-block;background:var(--sky-pale);color:var(--sky-deep);
  font-size:11px;font-weight:700;letter-spacing:0.08em;
  padding:4px 10px;border-radius:10px;margin-bottom:12px;
}
.pm-name{
  font-size:20px;font-weight:700;color:var(--navy);
  line-height:1.5;margin:0 0 12px;letter-spacing:0.02em;
}
.pm-vendor{font-size:12px;color:var(--muted);margin-bottom:6px}
.pm-vendor strong{color:var(--navy);font-weight:700}
.pm-size{font-size:12px;color:var(--muted);margin-bottom:14px}
.pm-price{margin-bottom:16px;padding:12px 0;border-top:1px dashed var(--line);border-bottom:1px dashed var(--line)}
.pm-price-value{font-size:26px;font-weight:700;color:#c53030;letter-spacing:0.02em}
.pm-price-value.tbd{font-size:16px;color:var(--muted)}
.pm-price-tax{font-size:11px;color:var(--muted);margin-left:6px}
.pm-desc{
  font-size:13px;color:var(--text);line-height:1.95;
  margin-bottom:22px;
}
.pm-desc strong{color:var(--navy)}
.pm-desc-empty{color:var(--muted);font-style:italic;font-size:12px}
.pm-desc ul{margin:6px 0 8px 18px;padding:0}
.pm-desc li{margin-bottom:4px}
.pm-actions{display:flex;gap:10px;align-items:center}
.pm-qty{display:inline-flex;align-items:center;gap:0;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.pm-qty-btn{
  width:32px;height:40px;background:#fff;border:none;
  color:var(--sky-deep);font-size:18px;font-weight:700;cursor:pointer;
  font-family:inherit;transition:background 0.2s;
}
.pm-qty-btn:hover{background:var(--sky-pale)}
.pm-qty-input{
  width:48px;height:40px;border:none;border-left:1px solid var(--line);border-right:1px solid var(--line);
  text-align:center;font-family:inherit;font-size:14px;color:var(--text);outline:none;
}
.pm-add{
  flex:1;background:var(--accent);color:var(--navy);
  border:none;border-radius:8px;padding:0 20px;height:44px;
  font-family:inherit;font-size:14px;font-weight:700;letter-spacing:0.06em;
  cursor:pointer;transition:background 0.2s;
}
.pm-add:hover{background:#d99928}
.pm-add:disabled{background:#e0e5ea;color:#a0b0bc;cursor:not-allowed}

@media(max-width:640px){
  #shop-modal{padding:12px}
  .pm-grid{grid-template-columns:1fr}
  .pm-img{border-radius:16px 16px 0 0;min-height:240px;aspect-ratio:1/1}
  .pm-info{padding:24px 22px}
  .pm-name{font-size:17px}
}

@media(max-width:760px){
  .shop-topbar{padding:0 12px;gap:6px;height:56px}
  .shop-brand-mark{width:30px;height:30px;font-size:13px}
  .shop-brand-name{font-size:12px;letter-spacing:0.03em}
  .shop-brand-sub{display:none}
  .shop-nav-link{display:none}
  .shop-nav{gap:6px}
  .shop-home-btn,.shop-cart-btn{padding:6px 10px;font-size:11px;gap:4px}
  .shop-home-btn span:not(.shop-home-icon){display:none}
  .shop-home-icon{font-size:15px}
  .shop-cart-btn{font-size:0;padding:6px 12px}
  .shop-cart-btn::before{content:'🛒';font-size:16px}
  .shop-cart-badge{font-size:10px;min-width:16px;height:16px;padding:0 4px}
  .shop-logout{padding:5px 10px;font-size:10px;letter-spacing:0.04em}
  .crumbs{padding:10px 16px}
  .vendor-hero{padding:24px 16px}
  .vendor-hero-inner{grid-template-columns:1fr;gap:14px;text-align:center}
  .vendor-hero-logo{margin:0 auto}
  .shop-main{padding:28px 16px 60px}
  .products{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
  .product{padding:12px 12px 12px}
  .product-name{font-size:13px;min-height:38px}
  .product-price-value{font-size:17px}
}
