/* ==================== BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Century Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #F6E2E1;
  color: #2c2c2c;
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== HEADER ==================== */
.headerr {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(246, 226, 225, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.headerr__container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  min-height: 80px;
}

.logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.checkout-title {
  font-size: clamp(20px, 3vw, 28px);
  color: #2c2c2c;
  font-weight: 600;
}

.pereklad {
  appearance: none;
  background-color: #5a6d4b;
  color: white;
  padding: 8px 25px 8px 15px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.pereklad:hover {
  background-color: #7aa54d;
}

/* ==================== MAIN CONTAINER ==================== */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 30px;
  max-width: 1400px;
  margin: 100px auto 0;
  padding: 40px 20px;
  min-height: calc(100vh - 100px);
}

/* ==================== FORMS ==================== */
.koshik-forms {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.koshik__content,
.koshik__content-1,
.koshik__content-2 {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 30px;
  transition: all 0.3s ease;
}

.koshik__content.collapsed,
.koshik__content-1.collapsed,
.koshik__content-2.collapsed {
  padding: 20px 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #212529;
}

.btn-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-edit:hover {
  background-color: #f8f9fa;
  color: #212529;
}

.btn-edit svg {
  width: 16px;
  height: 16px;
}

.section-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.section-label {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  display: block;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recipient-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subsection-title {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

/* ==================== RADIO BUTTONS ==================== */
.radio-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.radio-group-wrap {
  flex-wrap: wrap;
}

.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.radio input[type="radio"]:checked + .radio-custom {
  border-color: #5a6d4b;
}

.radio input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #5a6d4b;
  border-radius: 50%;
}

.radio:hover .radio-custom {
  border-color: #5a6d4b;
}

/* Large radio buttons for payment */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-large {
  padding: 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  transition: all 0.2s;
}

.radio-large:hover {
  border-color: #5a6d4b;
  background-color: #f8f9fa;
}

.radio-large:has(input[type="radio"]:checked) {
  border-color: #5a6d4b;
  background-color: #f0fdf4;
}

.radio-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radio-subtext {
  font-size: 13px;
  color: #6c757d;
}

/* ==================== INPUT FIELDS ==================== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
}

.name-input {
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
  width: 100%;
  font-family: inherit;
}

.name-input:focus {
  outline: none;
  border-color: #5a6d4b;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.name-input.input-error {
  border-color: #dc3545;
}

.name-input.input-error:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
  font-size: 13px;
  color: #dc3545;
  min-height: 18px;
}

.phone-input-wrapper {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.phone-country {
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.phone-country:focus {
  outline: none;
  border-color: #5a6d4b;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.comment-input {
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
  width: 100%;
  min-height: 80px;
  max-height: 200px;
}

.comment-input:focus {
  outline: none;
  border-color: #5a6d4b;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* ==================== CHECKBOXES ==================== */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #dee2e6;
  border-radius: 4px;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checkbox input[type="radio"]:checked + .checkbox-custom {
  border-color: #5a6d4b;
  background-color: #5a6d4b;
}

.checkbox input[type="radio"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.checkbox:hover .checkbox-custom {
  border-color: #5a6d4b;
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: inherit;
}

.btn-primary {
  background-color: #5a6d4b;
  color: white;
}

.btn-primary:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
  background-color: #f8f9fa;
  color: #495057;
  border: 2px solid #dee2e6;
}

.btn-secondary:hover {
  background-color: #e9ecef;
}

.btn-accent {
  background-color: white;
  color: #5a6d4b;
  border: 2px solid #5a6d4b;
}

.btn-accent:hover {
  background-color: #5a6d4b;
  color: white;
}

.btn-full {
  width: 100%;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==================== ADDRESS DETAILS ==================== */
.address-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.geo-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: #e7f3ff;
  border-left: 4px solid #2196F3;
  border-radius: 8px;
  color: #0d47a1;
  font-size: 14px;
  line-height: 1.5;
}

.geo-info svg {
  flex-shrink: 0;
  color: #2196F3;
}

/* ==================== SUMMARY ==================== */
.section-summary {
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #5a6d4b;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-info p {
  font-size: 14px;
  color: #495057;
  margin: 0;
}

.summary-info strong {
  color: #212529;
  font-weight: 600;
}

/* ==================== CART SIDEBAR ==================== */
.cart-sidebar {
  position: relative;
  height: fit-content;
}

.cart-sticky {
  position: sticky;
  top: 100px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-title {
  font-size: 20px;
  font-weight: 600;
  color: #212529;
  margin: 0 0 15px 0;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s;
}

.cart-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #212529;
  line-height: 1.4;
  margin: 0 0 8px 0;
}

.cart-item-price {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
}

.cart-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.cart-item-total {
  font-size: 16px;
  font-weight: 600;
  color: #5a6d4b;
  margin: 0;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #6c757d;
  transition: all 0.2s;
  border-radius: 4px;
}

.cart-item-remove:hover {
  background-color: #fee;
  color: #dc3545;
}

/* ==================== PROMO CODE ==================== */
.promo-section {
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.promo-title {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 12px;
}

.promo-input-group {
  display: flex;
  gap: 8px;
}

.promo-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
}

.promo-input:focus {
  outline: none;
  border-color: #5a6d4b;
}

.btn-promo {
  padding: 10px 20px;
  background-color: #5a6d4b;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-promo:hover {
  background-color: #218838;
}

.btn-promo:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-promo:disabled:hover {
  background-color: #5a6d4b;
}

.promo-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.promo-message {
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

.promo-message.success {
  color: #5a6d4b;
}

.promo-message.error {
  color: #dc3545;
}

/* ==================== CART SUMMARY ==================== */
.cart-summary {
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.summary-row span:first-child {
  color: #6c757d;
}

.summary-price {
  font-weight: 600;
  color: #212529;
}

.summary-discount {
  font-weight: 600;
  color: #dc3545;
}

.summary-total {
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
  font-size: 18px;
  font-weight: 600;
}

.summary-price-total {
  color: #5a6d4b;
  font-size: 20px;
  font-weight: 700;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-state p {
  color: #6c757d;
  margin-bottom: 20px;
}

/* ==================== NOTIFICATIONS ==================== */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  font-size: 15px;
  font-weight: 500;
  z-index: 3000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  max-width: 400px;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification-success {
  border-left: 4px solid #5a6d4b;
  color: #155724;
  background: #d4edda;
}

.notification-error {
  border-left: 4px solid #dc3545;
  color: #721c24;
  background: #f8d7da;
}

/* ==================== COOKIE CONSENT ==================== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 20px;
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  margin: 0;
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
  min-width: 300px;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.btn-cookie-accept,
.btn-cookie-decline {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-cookie-accept {
  background-color: #5a6d4b;
  color: white;
}

.btn-cookie-accept:hover {
  background-color: #4a5d3b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 109, 75, 0.3);
}

.btn-cookie-decline {
  background-color: #f8f9fa;
  color: #495057;
  border: 2px solid #dee2e6;
}

.btn-cookie-decline:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#card-input-container,
#courier-address-section,
#address-fields-container,
#geo-location-container {
  animation: fadeIn 0.3s ease;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
  .checkout-container {
    grid-template-columns: 1fr;
  }

  .cart-sidebar {
    order: -1;
  }

  .cart-sticky {
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .headerr__container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
  }

  .checkout-title {
    order: 2;
    width: 100%;
    text-align: center;
  }

  .checkout-container {
    padding: 20px 15px;
    margin-top: 120px;
  }

  .koshik__content,
  .koshik__content-1,
  .koshik__content-2 {
    padding: 20px;
  }

  .section-header h1 {
    font-size: 20px;
  }

  .button-group {
    grid-template-columns: 1fr;
  }

  .phone-input-wrapper {
    grid-template-columns: 100px 1fr;
  }

  .cart-sticky {
    padding: 20px;
  }

  .address-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cookie-consent {
    padding: 15px;
  }
  
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .cookie-text {
    min-width: 100%;
    text-align: center;
  }
  
  .cookie-buttons {
    width: 100%;
    flex-direction: column;
  }
  
  .btn-cookie-accept,
  .btn-cookie-decline {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .radio-group {
    flex-direction: column;
  }

  .notification {
    left: 15px;
    right: 15px;
    max-width: none;
  }

  .address-details-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    flex-direction: column;
  }

  .cart-item-image {
    width: 100%;
    height: 150px;
  }

  .cart-item-footer {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
  }
}

/* ==================== BOTTOM NAV (MOBILE) ==================== */
.bottom-nav {
  display: none;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(246, 226, 225, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
  z-index: 999;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-decoration: none; color: #333;
  padding: 6px 8px; transition: all 0.3s ease; position: relative;
}
.bottom-nav-item:active { transform: scale(0.95); }
.bottom-nav-item::before {
  content: ''; position: absolute; top: 0;
  left: 50%; transform: translateX(-50%);
  width: 0; height: 3px;
  background: linear-gradient(90deg, #f4a5ec, #c23eff);
  transition: width 0.3s ease; border-radius: 0 0 3px 3px;
}
.bottom-nav-item:hover::before,
.bottom-nav-item:active::before,
.bottom-nav-item.active::before { width: 60%; }
.bottom-nav-item.active { color: #c23eff; }
.bottom-nav-icon { font-size: 24px; margin-bottom: 2px; }
.bottom-nav-item span { font-size: 11px; font-weight: 600; text-align: center; }
.bottom-nav-lang {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 6px 8px; position: relative; cursor: pointer;
}
.bottom-nav-lang select {
  appearance: none; background: transparent; color: #333;
  border: none; font-size: 11px; font-weight: 600; cursor: pointer;
  text-align: center; padding: 0; margin-top: 2px;
  outline: none; width: 100%; pointer-events: none;
}
.bottom-nav-lang select:focus { pointer-events: auto; }
.bottom-nav-lang .bottom-nav-icon { font-size: 24px; margin-bottom: 2px; }

@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: 70px; }
}
@media (min-width: 769px) {
  .bottom-nav { display: none !important; }
  body { padding-bottom: 0; }
}