/* store/plastic.php + plastic_detail.php — standalone public plastic catalogue.
   Uses store_theme.css central colors, navbar, footer.
   All plastic photos follow the original catalogue image ratio: 857 x 1200 (portrait).
   Images are contained, not cropped or stretched. */
.plastic-public-page{--pl-photo-ratio:857 / 1200}
.plastic-public-page .pl-main{width:100%;max-width:1280px;padding-top:24px;padding-bottom:62px}
.pl-hero{position:relative;overflow:hidden;padding:34px 36px 31px;border-radius:28px;background:linear-gradient(128deg,#0b2b50,#1a4c85 70%,#326ca5);box-shadow:0 22px 50px rgba(8,32,67,.15);color:#fff}
.pl-hero::after{content:"";position:absolute;width:310px;height:310px;top:-125px;right:-78px;border:48px solid rgba(247,220,134,.13);border-radius:50%;pointer-events:none}
.pl-hero-kicker{display:flex;align-items:center;gap:8px;font-size:.74rem;font-weight:900;letter-spacing:.105em;color:#b6923d}
.pl-hero .pl-hero-kicker{color:#f1d88c}
.pl-hero h1{font-size:clamp(1.8rem,4vw,2.65rem);font-weight:900;letter-spacing:-.025em;margin:10px 0 5px}
.pl-hero p{max-width:760px;opacity:.88;margin:0;font-weight:600;line-height:1.65;font-size:.95rem}
.pl-search-surface{margin:18px 0 22px;padding:14px;border:1px solid #dbe7f5;background:#fff;border-radius:21px;box-shadow:0 9px 25px rgba(9,36,72,.055)}
.pl-search-form{display:flex;align-items:center;gap:9px;min-width:0;margin:0}
.pl-search-field{display:flex;align-items:center;gap:10px;flex:1;min-width:0;height:46px;padding:0 14px;border:1px solid #d4e0ee;border-radius:14px;color:#436488;background:#fafcff;transition:border .18s,box-shadow .18s}
.pl-search-field:focus-within{border-color:#4d82c0;box-shadow:0 0 0 3px rgba(67,124,193,.13)}
.pl-search-field input{border:0;outline:0;min-width:0;flex:1;height:100%;background:transparent;color:#153154;font-size:.93rem;font-family:inherit}
.pl-search-field input::placeholder{color:#91a0b4}
.pl-btn{min-height:46px;display:inline-flex;justify-content:center;align-items:center;gap:7px;flex-shrink:0;padding:0 19px;border-radius:14px;border:1px solid #d5e4f4;white-space:nowrap;text-decoration:none;font-size:.88rem;font-weight:800;transition:filter .15s,transform .15s}
.pl-btn:hover{transform:translateY(-1px)}
.pl-btn-primary{background:linear-gradient(130deg,#194d8a,#2c75c2);border-color:#286ab0;color:#fff}
.pl-btn-primary:hover{color:#fff;filter:brightness(1.08)}
.pl-btn-quiet{background:#f4f8fe;color:#25507c;padding:0;width:46px}
.pl-results-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;color:#19385e}
.pl-results-bar strong{font-weight:900;font-size:1.02rem}
.pl-results-bar span{font-size:.80rem;color:#60748c;background:#fff;border:1px solid #dce7f4;border-radius:999px;padding:6px 12px;font-weight:800}
.pl-product-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:15px}
.pl-product-card{display:flex;flex-direction:column;overflow:hidden;min-width:0;background:#fff;border:1px solid #dce6f1;border-radius:20px;text-decoration:none;color:#19365b;box-shadow:0 9px 26px rgba(9,31,68,.066);transition:transform .2s,box-shadow .2s,border-color .2s}
.pl-product-card:hover,.pl-product-card:focus-visible{transform:translateY(-4px);color:#19365b;border-color:#92b4dd;box-shadow:0 16px 32px rgba(9,37,75,.13)}
.pl-cover{width:100%;aspect-ratio:var(--pl-photo-ratio);display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#f7fbff,#e9f0f9)}
.pl-cover img,.pl-detail-media img{display:block;width:100%;height:100%;object-fit:contain;object-position:center center}
.pl-no-photo{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:#afc2d8;font-size:3.4rem}
.pl-product-info{padding:13px 15px 16px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;flex:1;gap:7px}
.pl-code{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:900;font-size:.74rem;color:#245b97;border-radius:8px;padding:4px 9px;background:#edf5ff;border:1px solid #d7e7fa}
.pl-product-name{font-size:.98rem;font-weight:900;line-height:1.45;min-height:2.85em;overflow-wrap:anywhere}
.pl-product-open{display:flex;align-items:center;gap:7px;margin-top:auto;padding-top:7px;font-size:.80rem;color:#6d798a;font-weight:800}
.pl-empty{margin:14px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:180px;padding:25px;text-align:center;background:#fff;color:#526781;border:1px solid #dce6f1;border-radius:20px;font-weight:800}
.pl-empty i{font-size:2.25rem;color:#a5b9d0}
.pl-pager{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;margin-top:26px}
.pl-pager a,.pl-pager span{padding:9px 15px;border:1px solid #dce6f1;border-radius:12px;background:#fff;font-weight:800;font-size:.86rem;text-decoration:none;color:#285484}
.pl-pager span{color:#647792}
.pl-detail-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 18px}
.pl-detail-bar a{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:7px 12px;background:#fff;border:1px solid #dbe6f3;border-radius:12px;color:#1e4b7a;text-decoration:none;font-size:.85rem;font-weight:800}
.pl-detail-bar a:hover{color:#123d72;background:#f3f9ff}
.pl-detail-layout{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:20px;align-items:start}
.pl-detail-media{width:100%;min-width:0;min-height:0;aspect-ratio:var(--pl-photo-ratio);display:grid;place-items:center;overflow:hidden;background:linear-gradient(135deg,#fff,#e9f3fe);border-radius:23px;border:1px solid #dce8f5;box-shadow:0 12px 35px rgba(7,37,73,.075)}
.pl-detail-info{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:34px;background:#fff;border:1px solid #dce7f4;border-radius:23px;box-shadow:0 12px 35px rgba(7,37,73,.06)}
.pl-detail-code{margin-top:20px;display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px;background:#ecf4fd;color:#38638e;border-radius:10px;padding:7px 12px;font-size:.80rem;font-weight:700}
.pl-detail-code strong{color:#174a88;font-weight:900}
.pl-detail-info h1{font-size:clamp(1.55rem,3.2vw,2.25rem);line-height:1.25;font-weight:900;margin:13px 0 8px;color:#0c2b4e;overflow-wrap:anywhere}
.pl-detail-intro{color:#6b7d90;font-weight:600;line-height:1.6;font-size:.92rem;margin-bottom:20px}
.pl-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;margin-top:auto}
.pl-stat{padding:16px;border-radius:16px;border:1px solid #dce8f4;background:linear-gradient(145deg,#f5faff,#eef5fd);min-width:0}
.pl-stat small{display:block;font-weight:800;font-size:.78rem;color:#64809e;margin-bottom:7px}
.pl-stat strong{color:#164979;font-size:clamp(1.05rem,2.2vw,1.56rem);font-weight:900;overflow-wrap:anywhere}
.pl-stat strong span{font-size:.84rem;font-weight:700}
.pl-variants{margin-top:20px;padding:24px;border:1px solid #dce8f4;border-radius:24px;background:#fff;box-shadow:0 10px 30px rgba(7,37,73,.06)}
.pl-variants-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:15px}
.pl-variants-head h2{font-weight:900;color:#0f335c;margin:7px 0 0;font-size:1.28rem}
.pl-status{display:inline-flex;gap:7px;align-items:center;padding:7px 11px;border-radius:999px;font-size:.81rem;font-weight:900}
.pl-status i{font-size:.43rem}
.pl-status.has-stock,.pl-stock.yes{color:#0d7950;background:#eafaf2}
.pl-status.no-stock,.pl-stock.none{color:#a34646;background:#fff1f1}
.pl-variants-table-wrap{width:100%;overflow-x:auto;border-radius:15px;border:1px solid #dce7f3}
.pl-variants-table{width:100%;border-collapse:collapse;white-space:nowrap}
.pl-variants-table th{background:#edf4fc;color:#415f83;font-size:.86rem;font-weight:900}
.pl-variants-table th,.pl-variants-table td{padding:15px 20px;text-align:left}
.pl-variants-table th:nth-child(2),.pl-variants-table td:nth-child(2){text-align:center}
.pl-variants-table th:last-child,.pl-variants-table td:last-child{text-align:right}
.pl-variants-table tbody tr+tr{border-top:1px solid #e4edf5}
.pl-variants-table tbody tr:hover{background:#fbfdff}
.pl-thickness{display:inline-flex;align-items:center;gap:7px;color:#14365a;font-weight:900}
.pl-thickness small{font-size:.80rem;font-weight:800;color:#8393a4}
.pl-stock{display:inline-flex;align-items:center;justify-content:center;min-width:64px;padding:6px 10px;border-radius:10px;font-weight:800;font-size:.84rem}
.pl-amount{color:#173e71;font-weight:900;font-size:1rem}
.pl-stock-disclaimer{display:flex;align-items:flex-start;gap:9px;color:#7890a6;font-size:.77rem;line-height:1.5;margin:17px 0 0}
@media(max-width:1199.98px){.pl-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:991.98px){.pl-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.pl-detail-info{padding:22px}}
@media(max-width:767.98px){.plastic-public-page .pl-main{padding-top:15px}.pl-hero{padding:26px 23px;border-radius:21px}.pl-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.pl-detail-layout{grid-template-columns:1fr;gap:13px}.pl-detail-media{width:100%;max-width:420px;margin-inline:auto;aspect-ratio:var(--pl-photo-ratio);min-height:0}.pl-variants{padding:16px}.pl-variants-table th,.pl-variants-table td{padding:12px 13px}}
@media(max-width:575.98px){.pl-hero{padding:23px 18px}.pl-hero h1{font-size:1.75rem}.pl-hero p{font-size:.85rem}.pl-search-surface{padding:9px;border-radius:17px;margin:12px 0 18px}.pl-search-form{gap:6px}.pl-search-field{height:44px;padding:0 10px;gap:7px}.pl-search-field input{font-size:.82rem}.pl-btn{height:44px;min-height:44px;padding:0 12px;border-radius:12px}.pl-btn-primary span{display:none}.pl-btn-quiet{width:40px}.pl-product-card{border-radius:17px}.pl-product-info{padding:11px 10px 12px;gap:6px}.pl-product-name{font-size:.91rem}.pl-code{font-size:.70rem;padding:3px 6px}.pl-product-open{font-size:.72rem}.pl-detail-bar a{font-size:.76rem;padding:6px 9px}.pl-detail-info{padding:21px;border-radius:18px}.pl-detail-media{border-radius:18px}.pl-stat-grid{gap:9px}.pl-stat{padding:12px}.pl-stat strong{font-size:1.07rem}.pl-variants{border-radius:18px}.pl-variants-head h2{font-size:1.05rem}.pl-variants-table th,.pl-variants-table td{padding:12px 10px;font-size:.81rem}.pl-amount{font-size:.88rem}.pl-stock{font-size:.78rem;min-width:55px;padding:6px}}
@media(max-width:350px){.pl-product-grid{gap:8px}.pl-results-bar strong{font-size:.93rem}.pl-product-info{padding:9px}.pl-stat{padding:10px}}
@media(prefers-reduced-motion:reduce){.pl-product-card,.pl-btn,.pl-search-field{transition:none!important}}

/* Tight, square-edged photo wall for store/plastic.php only.
   Renders the entire original 857:1200 image without cropping the printed code.
   Product detail page keeps its previous styling. */
.pl-product-gallery{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:2px;
  margin:0;
  padding:0;
}
.pl-product-gallery .pl-product-card{
  display:block;
  min-width:0;
  padding:0;
  border:1px solid #d8b45c;
  border-radius:0;
  box-shadow:none;
  transform:none;
  background:#fff8e7;
  line-height:0;
  overflow:hidden;
}
.pl-product-gallery .pl-product-card:hover{
  border:1px solid #cfa649;
  border-radius:0;
  box-shadow:none;
  transform:none;
}
.pl-product-gallery .pl-product-card:focus-visible{
  border:1px solid #cfa649;
  border-radius:0;
  box-shadow:none;
  transform:none;
  outline:2px solid rgba(207,166,73,.55);
  outline-offset:-2px;
}
.pl-product-gallery .pl-cover{
  position:relative;
  width:100%;
  aspect-ratio:var(--pl-photo-ratio);
  border:0;
  border-radius:0;
  margin:0;
  padding:0;
  overflow:hidden;
  background:#fffdf7;
}
.pl-product-gallery .pl-cover img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  border-radius:0;
}
@media(max-width:1199.98px){.pl-product-gallery{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:991.98px){.pl-product-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:767.98px){.pl-product-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}}
@media(max-width:575.98px){.pl-product-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}}

/* Compact per-product availability: at least one thickness with qty > 0.
   Badges only appear on the plastic gallery, preserving the square gold edges. */
.pl-product-gallery .pl-gallery-stock{
  position:absolute;
  z-index:1;
  top:7px;
  right:7px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  max-width:calc(100% - 14px);
  padding:6px 9px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:999px;
  box-shadow:0 2px 9px rgba(0,0,0,.20);
  font-family:inherit;
  font-size:12px;
  font-weight:800;
  line-height:1.1;
  white-space:nowrap;
  pointer-events:none;
}
.pl-product-gallery .pl-gallery-stock svg{display:block;flex:none;width:15px;height:15px}
.pl-product-gallery .pl-gallery-stock.is-available{
  background:rgba(7,113,79,.94);
  color:#fff;
}
.pl-product-gallery .pl-gallery-stock.is-soldout{
  background:rgba(126,41,41,.94);
  color:#fff;
}
@media(max-width:575.98px){
  .pl-product-gallery .pl-gallery-stock{
    top:5px;
    right:5px;
    gap:4px;
    max-width:calc(100% - 10px);
    padding:5px 7px;
    font-size:10.5px;
  }
  .pl-product-gallery .pl-gallery-stock svg{width:13px;height:13px}
}

/* Public storefront: SELLING price below photos, never cost.
   Preserve the compact, square-edged photo-wall layout. */
.pl-product-gallery .pl-gallery-price{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  min-width:0;
  padding:9px 11px 10px;
  background:#fffef9;
  color:#173754;
  line-height:1.25;
  text-align:left;
}
.pl-product-gallery .pl-gallery-price-label{
  font-size:.7rem;
  font-weight:700;
  color:#768599;
}
.pl-product-gallery .pl-gallery-price-value{
  font-size:1.08rem;
  font-weight:900;
  letter-spacing:-.015em;
  color:#ad7318;
  white-space:nowrap;
}
.pl-product-gallery .pl-gallery-price-unset{
  font-size:.75rem;
  font-weight:700;
  color:#8795a5;
  line-height:1.3;
}
@media(max-width:575.98px){
  .pl-product-gallery .pl-gallery-price{padding:7px 8px 8px;gap:2px}
  .pl-product-gallery .pl-gallery-price-label{font-size:.65rem}
  .pl-product-gallery .pl-gallery-price-value{font-size:.99rem}
  .pl-product-gallery .pl-gallery-price-unset{font-size:.68rem}
}

/* Compact, public availability switch (store/plastic.php only). */
.pl-stock-filters{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:-7px 0 14px;
}
.pl-stock-filter{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:37px;
  padding:7px 16px;
  border:1px solid #d7e4f1;
  border-radius:11px;
  background:#fff;
  color:#36577d;
  font-size:.84rem;
  line-height:1.15;
  font-weight:800;
  white-space:nowrap;
  text-decoration:none;
  transition:background .15s,border-color .15s,color .15s;
}
.pl-stock-filter:hover,.pl-stock-filter:focus-visible{
  background:#f1f7ff;
  border-color:#90b0d4;
  color:#12395f;
}
.pl-stock-filter.is-active,
.pl-stock-filter.is-active:hover{
  background:#143e71;
  border-color:#143e71;
  color:#fff;
}
.pl-stock-filter.is-active i{color:#f1d783}
@media(max-width:575.98px){
  .pl-stock-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:-7px 0 12px}
  .pl-stock-filter{min-width:0;padding:7px 6px;min-height:36px;font-size:.80rem;gap:5px;border-radius:9px}
}
@media(prefers-reduced-motion:reduce){.pl-stock-filter{transition:none}}

/* Plastic GALLERY ONLY: denser browsing on tablet/PC, phone stays unchanged.
   Do not alter product_detail.php, sell prices, stock status or image fit. */
@media (min-width:768px){
  .pl-catalog-page .pl-product-gallery{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:1px;
  }
  .pl-catalog-page .pl-gallery-stock{top:5px;right:5px;padding:4px 7px;font-size:11px}
  .pl-catalog-page .pl-gallery-stock svg{width:13px;height:13px}
}
@media (min-width:992px){
  .pl-catalog-page .pl-hero{padding:18px 22px 17px;border-radius:15px;box-shadow:0 9px 22px rgba(8,32,67,.10)}
  .pl-catalog-page .pl-hero::after{width:210px;height:210px;top:-112px;right:-65px;border-width:30px}
  .pl-catalog-page .pl-hero h1{font-size:1.65rem;margin:5px 0 3px}
  .pl-catalog-page .pl-hero p{font-size:.85rem;line-height:1.45}
  .pl-catalog-page .pl-search-surface{margin:10px 0 12px;padding:8px;border-radius:12px;box-shadow:0 5px 15px rgba(9,36,72,.045)}
  .pl-catalog-page .pl-search-form{gap:6px}
  .pl-catalog-page .pl-search-field{height:39px;border-radius:9px;padding:0 11px}
  .pl-catalog-page .pl-btn{height:39px;min-height:39px;border-radius:9px;padding:0 13px}
  .pl-catalog-page .pl-btn-quiet{width:39px;padding:0}
  .pl-catalog-page .pl-stock-filters{gap:5px;margin:-3px 0 9px}
  .pl-catalog-page .pl-stock-filter{min-height:33px;padding:6px 12px;border-radius:8px;font-size:.80rem}
  .pl-catalog-page .pl-results-bar{margin-bottom:8px}
  .pl-catalog-page .pl-results-bar strong{font-size:.94rem}
  .pl-catalog-page .pl-results-bar span{padding:4px 9px;font-size:.74rem}
  .pl-catalog-page .pl-product-gallery{grid-template-columns:repeat(7,minmax(0,1fr));gap:1px}
}
@media (min-width:1200px){
  .pl-catalog-page .pl-product-gallery{grid-template-columns:repeat(8,minmax(0,1fr))}
}

/* 2026-10-13 — Store Plastic / Desktop right alignment.
   Phone/tablet layouts, stock filters, selling price and details stay unchanged.
   Align filters, headings and incomplete final product row to the RIGHT on PC.
   Use flex only for the desktop gallery so the last incomplete row is right aligned;
   widths retain the existing 7/8-column compact desktop grid. */
@media (min-width:992px) {
  .pl-catalog-page .pl-hero {text-align:right}
  .pl-catalog-page .pl-hero-kicker {justify-content:flex-end}
  .pl-catalog-page .pl-hero p {margin-left:auto;margin-right:0}
  .pl-catalog-page .pl-search-surface {width:min(100%,720px);margin-left:auto;margin-right:0}
  .pl-catalog-page .pl-stock-filters {justify-content:flex-start}
  .pl-catalog-page .pl-results-bar {flex-direction:row-reverse}
  .pl-catalog-page .pl-product-gallery {
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:1px;
  }
  .pl-catalog-page .pl-product-gallery .pl-product-card {
    flex:0 0 calc((100% - 6px) / 7);
    max-width:calc((100% - 6px) / 7);
  }
}
@media (min-width:1200px) {
  .pl-catalog-page .pl-product-gallery .pl-product-card {
    flex-basis:calc((100% - 7px) / 8);
    max-width:calc((100% - 7px) / 8);
  }
}


/* Plastic catalog: desktop search and availability filters share ONE toolbar.
   Left: available / sold out / all. Right: search input and search button.
   This is scoped to PC; mobile and tablet keep the existing stacked UI. */
@media (min-width:992px) {
  .pl-catalog-page .pl-catalog-controls {
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    margin:10px 0 12px;
  }
  .pl-catalog-page .pl-stock-filters {
    order:0;
    flex:0 0 auto;
    display:flex;
    flex-wrap:nowrap;
    gap:6px;
    justify-content:flex-start;
    margin:0;
  }
  .pl-catalog-page .pl-stock-filter {
    box-sizing:border-box;
    height:39px;
    min-height:39px;
    padding:0 13px;
    border-radius:9px;
    font-size:.80rem;
  }
  .pl-catalog-page .pl-search-surface {
    order:1;
    flex:1 1 0;
    width:auto;
    min-width:0;
    max-width:none;
    margin:0;
  }
}
