/* =====================================================================
   PolyAutomatic Eshop — veřejná část
   Barvy a typografie vycházejí z Design manuálu PolyAutomatic (13.12.2023):
   Quicksand (identifikační písmo), šestibarevná škála, světlé plochy
   s obvodovým ("circuit board") motivem.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --c-navy:   #002855; /* Pantone 295 EC */
  --c-blue:   #009CDE; /* Pantone 2925 EC */
  --c-teal:   #00B2A9; /* Pantone 326 EC */
  --c-green:  #84BD00; /* Pantone 376 EC */
  --c-yellow: #FFC72C; /* Pantone 123 EC */
  --c-red:    #E03C31; /* Pantone 179 EC */
  --c-black:  #14171A;

  --bg:        #FAFBFC;
  --bg-alt:    #F1F4F7;
  --card-bg:   #FFFFFF;
  --text:      #1D2733;
  --text-soft: #5B6B7A;
  --border:    #E3E8ED;

  --radius: 10px;
  --shadow: 0 2px 10px rgba(0, 40, 85, 0.06);
  --shadow-lg: 0 12px 30px rgba(0, 40, 85, 0.12);
  --stripe: linear-gradient(90deg, var(--c-navy) 0 16.6%, var(--c-blue) 16.6% 33.2%, var(--c-teal) 33.2% 49.8%, var(--c-green) 49.8% 66.4%, var(--c-yellow) 66.4% 83%, var(--c-red) 83% 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Quicksand', 'Arial', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Quicksand', sans-serif;
  color: var(--c-navy);
  font-weight: 600;
  letter-spacing: .3px;
  margin: 0 0 .5em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Stripe motiv ---------- */
.stripe-bar { height: 5px; background: var(--stripe); }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1180px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--c-black);
  font-size: 1.05rem;
}
.logo .logo-box {
  background: var(--c-black);
  color: #fff;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  font-size: .95rem;
}
.logo .logo-sub {
  color: var(--c-navy);
  font-weight: 600;
  letter-spacing: 2px;
  font-size: .8rem;
  text-transform: uppercase;
}
.logo small { display:block; font-size:.6rem; color: var(--text-soft); letter-spacing:1px; }

.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--text); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--c-blue); text-decoration: none; }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-navy);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: .9rem;
}
.cart-link:hover { background: var(--c-blue); text-decoration: none; }
.cart-badge {
  background: var(--c-red);
  color: #fff;
  border-radius: 20px;
  padding: 1px 7px;
  font-size: .75rem;
  font-weight: 700;
}

@media (max-width: 600px) {
  .site-header .inner { padding: 12px 14px; flex-wrap: wrap; row-gap: 8px; }
  .logo { font-size: .95rem; gap: 7px; }
  .logo .logo-sub, .logo small { display: none; }
  .main-nav { gap: 10px; }
  .main-nav a { font-size: .85rem; }
  .cart-link { padding: 7px 12px; font-size: .82rem; gap: 5px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bg-alt);
  overflow: hidden;
  padding: 56px 0 44px;
  background-image:
    radial-gradient(circle at 90% 20%, rgba(0,156,222,.08), transparent 60%),
    radial-gradient(circle at 8% 90%, rgba(0,178,169,.08), transparent 55%);
}
.hero h1 { font-size: 2.1rem; max-width: 720px; }
.hero p { color: var(--text-soft); max-width: 620px; font-size: 1.05rem; }
.hero .stripe-bar { position:absolute; left:0; right:0; bottom:0; }

/* ---------- Breadcrumb / page head ---------- */
.page-head { padding: 30px 0 10px; }
.page-head .stripe-bar { width: 60px; height: 4px; margin-bottom: 14px; border-radius: 2px; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding: 30px 0 60px;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card .thumb {
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .placeholder { color: var(--text-soft); font-size: .8rem; }
.product-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { margin: 0; font-size: 1.05rem; }
.product-card h3 a { color: var(--c-navy); }
.product-card .desc { color: var(--text-soft); font-size: .88rem; flex: 1; }
.product-card .price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { color: var(--c-navy); font-weight: 700; font-size: 1.15rem; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 30px;
  padding: 11px 22px;
  font-family: inherit;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  background: var(--c-navy);
  color: #fff;
  transition: background .15s ease;
}
.btn:hover { background: var(--c-blue); text-decoration: none; color: #fff; }
.btn.btn-outline { background: transparent; border: 1.5px solid var(--c-navy); color: var(--c-navy); }
.btn.btn-outline:hover { background: var(--c-navy); color: #fff; }
.btn.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn.btn-danger { background: var(--c-red); }
.btn.btn-danger:hover { background: #b8261d; }
.btn.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 40px; padding: 30px 0 60px; align-items: start; }
.product-detail .thumb { border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); aspect-ratio: 4/3; display:flex; align-items:center; justify-content:center; }
.product-detail .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail .info h1 { font-size: 1.7rem; }
.product-detail .price { font-size: 1.6rem; display: block; margin: 14px 0 18px; }
.product-detail .desc { color: var(--text-soft); margin-bottom: 24px; white-space: pre-line; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }

/* Malé náhledy obrázků produktu — po kliknutí se otevře zvětšenina (lightbox) */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-thumb { padding: 0; border: none; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--bg-alt); cursor: zoom-in; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s ease; }
.gallery-thumb:hover img { transform: scale(1.06); }

.lightbox { position: fixed; inset: 0; background: rgba(10, 14, 20, .92); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 50px 60px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; }
.lightbox-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; padding: 6px; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 2rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; line-height: 1; }
.lightbox-nav:hover { background: rgba(255,255,255,.28); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .lightbox { padding: 20px 46px; }
}

/* ---------- Příslušenství ---------- */
.accessories-box { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.accessories-box h3 { font-size: 1rem; margin-bottom: 10px; }
.accessory-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: .92rem;
}
.accessory-option:last-of-type { border-bottom: none; }
.accessory-option input { width: auto; margin: 0; }
.accessory-option .accessory-name { flex: 1; }
.accessory-option .accessory-price { color: var(--c-teal); font-weight: 600; }
.total-preview { margin-top: 14px; font-size: .95rem; color: var(--text-soft); }
.total-preview strong { color: var(--c-navy); font-size: 1.1rem; }

.accessory-list { list-style: none; margin: 4px 0 0; padding: 0; font-size: .8rem; color: var(--text-soft); }
.accessory-list li { padding: 1px 0; }

/* ---------- Cart / checkout ---------- */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cart-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.cart-table th { text-align: left; color: var(--text-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--border); padding: 10px 8px; white-space: nowrap; }
.cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table .prod-cell { display: flex; align-items: center; gap: 12px; }
.cart-table .prod-cell img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--bg-alt); }
.cart-table .qty-input { width: 56px; }

@media (max-width: 600px) {
  .cart-table { min-width: 560px; }
  .cart-table .prod-cell img { width: 44px; height: 44px; }
}
.qty-input { width: 60px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }
.cart-summary { display: flex; justify-content: flex-end; margin: 20px 0; }
.cart-summary .box { min-width: 280px; background: var(--bg-alt); border-radius: var(--radius); padding: 20px; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 6px 0; }
.cart-summary .total { font-weight: 700; font-size: 1.2rem; color: var(--c-navy); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }
.cart-actions { display: flex; justify-content: space-between; margin: 20px 0 50px; gap: 10px; flex-wrap: wrap; }

.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 30px 0 60px; align-items: start; }
@media (max-width: 800px) { .checkout-grid { grid-template-columns: 1fr; } }

.form-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--c-navy); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  color: var(--text);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(0,156,222,.15);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) { .form-grid-2 { grid-template-columns: 1fr; } }

.order-summary-box { background: var(--bg-alt); border-radius: var(--radius); padding: 22px; }
.order-summary-box .line { display: flex; justify-content: space-between; font-size: .92rem; padding: 6px 0; border-bottom: 1px solid var(--border); }
.order-summary-box .total { font-weight: 700; font-size: 1.15rem; color: var(--c-navy); padding-top: 12px; }

/* ---------- Confirmation ---------- */
.confirm-box { text-align: center; padding: 70px 20px; }
.confirm-box .icon { font-size: 3rem; color: var(--c-green); margin-bottom: 10px; }
.confirm-box .order-number { display: inline-block; background: var(--bg-alt); color: var(--c-navy); font-weight: 700; padding: 8px 18px; border-radius: 30px; margin: 14px 0 20px; }

/* ---------- Alerts / flash ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; }
.alert-success { background: #E9F7E4; color: #2E6B1F; border: 1px solid #C9E9BE; }
.alert-error { background: #FDECEC; color: #A32720; border: 1px solid #F6C9C6; }
.alert-info { background: #E7F5FC; color: #045481; border: 1px solid #C6E6F5; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-navy); color: #cfe0ee; margin-top: 40px; }
.site-footer .inner { padding: 34px 20px 26px; max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.site-footer h4 { color: #fff; font-size: .95rem; }
.site-footer a { color: #cfe0ee; }
.site-footer a:hover { color: #fff; }
.site-footer .cols { display: flex; gap: 50px; flex-wrap: wrap; }
.site-footer .bottom { text-align: center; font-size: .8rem; padding: 14px 0; color: #9fb7cc; border-top: 1px solid rgba(255,255,255,.12); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.badge-nova { background: #E7F5FC; color: #045481; }
.badge-zpracovava_se { background: #FFF6E0; color: #8A6300; }
.badge-expedovano { background: #E1F5F3; color: #00776F; }
.badge-dokonceno { background: #EDF7DD; color: #4C6B00; }
.badge-zruseno { background: #FDECEC; color: #A32720; }

/* Soubory ke stažení na detailu produktu */
.downloads-box { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.downloads-box h3 { font-size: 1rem; margin-bottom: 10px; }
.download-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card-bg); color: var(--text); text-decoration: none;
  font-size: .92rem; transition: border-color .15s, box-shadow .15s;
}
.download-link:hover { border-color: var(--c-blue); box-shadow: var(--shadow); }
.download-lang {
  min-width: 34px; padding: 3px 6px; border-radius: 6px;
  background: var(--c-navy); color: #fff; font-weight: 700; font-size: .78rem; text-align: center;
}
.download-name { flex: 1; font-weight: 600; display: flex; flex-direction: column; line-height: 1.3; }
.download-type { font-weight: 500; color: var(--text-soft); font-size: .78rem; }
.download-meta { color: var(--text-soft); font-size: .8rem; white-space: nowrap; }
