/* ==========================================================================
   Dobrý futon — Nákupní košík, Pokladna a Potvrzení objednávky
   ========================================================================== */

/* Cart Badge v hlavičce */
.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: var(--color-brand-brown, #b95335);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Sekce košíku */
.cart-section,
.checkout-section,
.confirmation-section {
  padding: 40px 20px 80px;
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
}

.cart-section h1,
.checkout-section h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  margin-bottom: 24px;
}

/* Drobečková navigace */
.cart-section .breadcrumb,
.checkout-section .breadcrumb {
  font-size: 13px;
  color: var(--color-brand-gray, #626158);
  margin-bottom: 20px;
}

.cart-section .breadcrumb a,
.checkout-section .breadcrumb a {
  color: var(--color-brand-green, #6f8043);
  transition: opacity 0.2s;
}

.cart-section .breadcrumb a:hover,
.checkout-section .breadcrumb a:hover {
  text-decoration: underline;
}

/* Prázdný košík */
.cart-empty {
  text-align: center;
  padding: 80px 20px;
  background: var(--color-brand-bg-light, #faf8f3);
  border-radius: 12px;
  border: 1px solid var(--color-brand-border, #e8e4da);
}

.cart-empty i {
  color: var(--color-brand-gray, #626158);
  opacity: 0.4;
  margin-bottom: 16px;
}

.cart-empty h2 {
  font-size: 22px;
  color: var(--color-brand-dark, #20201e);
  margin-bottom: 16px;
}

/* Tabulka položek košíku */
.cart-table-wrapper {
  background: #fff;
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  background: var(--color-brand-bg-light, #faf8f3);
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-brand-gray, #626158);
  text-align: left;
  border-bottom: 1px solid var(--color-brand-border, #e8e4da);
}

.cart-table td {
  padding: 18px;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-brand-border, #e8e4da);
}

.cart-item-row:last-child td {
  border-bottom: none;
}

.cart-item-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-brand-border, #e8e4da);
  background: #fdfdfd;
}

.cart-item-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand-dark, #20201e);
  display: block;
  margin-bottom: 6px;
}

.cart-item-name:hover {
  color: var(--color-brand-green, #6f8043);
}

.cart-item-config {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--color-brand-gray, #626158);
  line-height: 1.5;
}

.cart-item-config li {
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.cart-item-subtotal {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  white-space: nowrap;
}

/* Stepper množství */
.cart-table .quantity-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.cart-table .quantity-stepper button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-bg-light, #faf8f3);
  color: var(--color-brand-dark, #20201e);
  font-size: 13px;
  transition: background 0.2s;
}

.cart-table .quantity-stepper button:hover {
  background: var(--color-brand-border, #e8e4da);
}

.cart-table .quantity-stepper input {
  width: 44px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--color-brand-border, #e8e4da);
  border-right: 1px solid var(--color-brand-border, #e8e4da);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  -moz-appearance: textfield;
}

.cart-table .quantity-stepper input::-webkit-outer-spin-button,
.cart-table .quantity-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-remove {
  color: #94a3b8;
  font-size: 16px;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-remove:hover {
  color: #e11d48;
  background: #ffe4e6;
}

/* Shrnutí košíku */
.cart-summary {
  background: none;
  border: none;
  padding: 16px 0;
  text-align: right;
}

.cart-summary h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-brand-dark, #20201e);
  margin: 0;
}

.cart-total-value {
  color: var(--color-brand-brown, #b95335);
  font-weight: 700;
  font-size: 24px;
  margin-left: 8px;
}

/* DPH prvky v košíku */
.cart-price-primary {
  font-weight: 600;
  color: var(--color-brand-dark, #20201e);
  white-space: nowrap;
}

.cart-price-secondary {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
}

.cart-vat-label {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-left: 3px;
}

.cart-summary-vat-breakdown {
  margin-bottom: 8px;
}

.cart-summary-line {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 4px;
}

.cart-summary-line strong {
  color: var(--color-brand-dark, #20201e);
  font-weight: 600;
  margin-left: 6px;
}

.cart-total-vat-label {
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  margin-left: 4px;
}

/* Akční tlačítka */
.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-brand-green, #6f8043);
  color: #fff;
  border: 1px solid var(--color-brand-green, #6f8043);
}

.btn-primary:hover {
  background: var(--color-brand-green-light, #788653);
  border-color: var(--color-brand-green-light, #788653);
}

.btn-secondary {
  background: #fff;
  color: var(--color-brand-dark, #20201e);
  border: 1px solid var(--color-brand-border, #e8e4da);
}

.btn-secondary:hover {
  background: var(--color-brand-bg-light, #faf8f3);
}

/* ==========================================================================
   Pokladna (Checkout)
   ========================================================================== */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.form-section {
  background: #fff;
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.form-section legend {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  padding: 0 8px;
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.col-half {
  flex: 1;
}

.col-full {
  flex: 1 1 100%;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-brand-dark, #20201e);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-brand-dark, #20201e);
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-brand-green, #6f8043);
  box-shadow: 0 0 0 3px rgba(111, 128, 67, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-brand-green, #6f8043);
}

/* Radio metody dopravy a platby */
.method-list,
.option-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-option {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.method-option:hover {
  background: var(--color-brand-bg-light, #faf8f3);
  border-color: var(--color-brand-green, #6f8043);
}

.method-option input[type="radio"] {
  accent-color: var(--color-brand-green, #6f8043);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.method-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-brand-dark, #20201e);
}

.method-desc {
  font-size: 12px;
  color: var(--color-brand-gray, #626158);
}

.method-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  white-space: nowrap;
}

.option-card {
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.option-card:hover {
  background: var(--color-brand-bg-light, #faf8f3);
}

.option-card.selected {
  border-color: var(--color-brand-green, #6f8043);
  background: rgba(111, 128, 67, 0.04);
}

.option-card label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  width: 100%;
}

.option-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--color-brand-green, #6f8043);
}

.option-info {
  flex: 1;
}

.option-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-brand-dark, #20201e);
}

.option-desc {
  font-size: 12px;
  color: var(--color-brand-gray, #626158);
  margin-top: 2px;
}

.option-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  white-space: nowrap;
}

.option-price.free {
  color: var(--color-brand-green, #6f8043);
}

/* Sidebar rekapitulace objednávky */
.checkout-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 112px;
  align-self: start;
  z-index: 30;
  max-height: calc(100vh - 125px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.checkout-summary,
.summary-card {
  background: var(--color-brand-bg-card, #faf8f7);
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.checkout-summary h3,
.summary-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-brand-border, #e8e4da);
}

.summary-items {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--color-brand-border, #e8e4da);
}

.summary-item-name {
  font-weight: 600;
  color: var(--color-brand-dark, #20201e);
}

.summary-item-config {
  font-size: 12px;
  color: var(--color-brand-gray, #626158);
  margin-top: 2px;
}

.summary-item-price {
  font-weight: 600;
  white-space: nowrap;
}

.summary-totals {
  border-top: 1px solid var(--color-brand-border, #e8e4da);
  padding-top: 12px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--color-brand-gray, #626158);
  margin-bottom: 8px;
}

.summary-row.total-row {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  border-top: 2px solid var(--color-brand-border, #e8e4da);
  padding-top: 12px;
  margin-top: 8px;
}

.summary-row.total-row .total-value {
  color: var(--color-brand-brown, #b95335);
  font-size: 22px;
}

.btn-checkout-submit,
.checkout-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  background: var(--color-brand-green, #6f8043);
  color: #fff;
  border: 1px solid var(--color-brand-green, #6f8043);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(111, 128, 67, 0.25);
  text-decoration: none;
}

.btn-checkout-submit:hover,
.checkout-submit-btn:hover {
  background: var(--color-brand-green-light, #788653);
  border-color: var(--color-brand-green-light, #788653);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(111, 128, 67, 0.35);
}

.checkout-actions {
  margin-top: 8px;
  margin-bottom: 32px;
}

.checkout-terms-note {
  font-size: 12.5px;
  color: var(--color-brand-gray, #626158);
  margin-top: 10px;
  line-height: 1.5;
  max-width: 440px;
}

.checkout-terms-note a {
  color: var(--color-brand-green, #6f8043);
  text-decoration: underline;
}

/* Alert chyb */
.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
}

.alert-danger ul {
  margin: 0;
  padding-left: 20px;
}

/* ==========================================================================
   Potvrzení objednávky (Confirmation)
   ========================================================================== */
.confirmation-section {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.confirmation-header {
  margin-bottom: 32px;
}

.confirmation-header i {
  color: var(--color-brand-green, #6f8043);
  margin-bottom: 12px;
}

.confirmation-header h1 {
  font-size: 28px;
  color: var(--color-brand-dark, #20201e);
  margin-bottom: 8px;
}

.confirmation-details {
  text-align: left;
}

.card {
  background: #fff;
  border: 1px solid var(--color-brand-border, #e8e4da);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-brand-dark, #20201e);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-brand-border, #e8e4da);
}

.card-body ul {
  padding-left: 20px;
  margin: 12px 0;
  line-height: 1.8;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-brand-border, #e8e4da);
  font-size: 14px;
}

.table tfoot td {
  font-weight: 600;
  border-bottom: none;
}

/* ==========================================================================
   Mobilní zobrazení (Responsivita)
   ========================================================================== */
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  
  .checkout-sidebar,
  .checkout-summary {
    position: static;
    top: auto;
  }
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-row .form-group {
    margin-bottom: 16px;
  }
  
  .cart-table thead {
    display: none;
  }
  
  .cart-table,
  .cart-table tbody,
  .cart-item-row,
  .cart-item-row td {
    display: block;
    width: 100%;
  }
  
  .cart-item-row {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid var(--color-brand-border, #e8e4da);
  }
  
  .cart-item-row td {
    padding: 6px 0;
    border: none;
  }
  
  .cart-item-image {
    text-align: center;
  }
  
  .cart-item-remove {
    position: absolute;
    top: 14px;
    right: 14px;
  }
}
