/* =========================================================
   МОДАЛЬНІ ВІКНА ТА СПЛИВАЮЧІ ПАНЕЛІ (ХАРКІВ)
   ========================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-dark);
  z-index: 10;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background-color: var(--color-accent-red);
  color: #ffffff;
}

.modal-body {
  padding: 36px;
}

/* Product Modal Layout */
.prod-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
}

.prod-modal-image {
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod-modal-image img {
  max-height: 260px;
  object-fit: contain;
}

.prod-modal-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.prod-modal-title {
  font-size: 26px;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.prod-modal-price {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--color-accent-red);
  margin-bottom: 4px;
}

.prod-modal-price .unit {
  font-size: 15px;
  color: var(--color-dark);
  font-weight: 400;
}

.prod-modal-tax-note {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.prod-modal-specs-list {
  background-color: var(--color-bg-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
}

.prod-modal-specs-list h4 {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.prod-modal-specs-list .spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.prod-modal-specs-list .spec-row:last-child {
  border-bottom: none;
}

.prod-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================================
   CART DRAWER & MODAL
   ========================================================= */

.cart-modal-window {
  max-width: 680px;
}

.cart-modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-modal-header h2 {
  font-size: 24px;
  color: var(--color-dark);
}

.cart-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cart-product-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 16px;
  align-items: center;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.cart-prod-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.cart-prod-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-dark);
}

.cart-prod-spec {
  font-size: 12px;
  color: var(--color-text-muted);
}

.cart-prod-price {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent-red);
}

.cart-prod-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
}

.qty-btn {
  width: 28px;
  height: 28px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark);
}

.qty-val {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.cart-remove-btn {
  color: #999;
  cursor: pointer;
}

.cart-remove-btn:hover {
  color: var(--color-accent-red);
}

.cart-config-block {
  background-color: #fdfdfd;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
}

.cart-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.days-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.days-select-wrap input {
  width: 70px;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
}

.cart-options-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}

.cart-summary-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.summary-line.discount {
  color: var(--color-accent-red);
  font-weight: 600;
}

.summary-line.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  padding-top: 10px;
  border-top: 2px solid var(--color-border);
}

.cart-tax-notice {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.cart-order-form-block {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}

.cart-order-form-block h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* =========================================================
   LIGHTBOX GALLERY MODAL
   ========================================================= */

.lightbox-window {
  background-color: transparent;
  box-shadow: none;
  max-width: 900px;
  text-align: center;
}

.lightbox-img-wrap {
  position: relative;
  margin-bottom: 16px;
}

.lightbox-img-wrap img {
  max-height: 75vh;
  border-radius: var(--radius-md);
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  color: var(--color-white);
  font-size: 16px;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(0,0,0,0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lightbox-nav-btn:hover {
  background-color: var(--color-accent-red);
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

/* =========================================================
   ARTICLE MODAL READER
   ========================================================= */

.article-modal-window {
  max-width: 760px;
}

.article-modal-title {
  font-size: 28px;
  margin-bottom: 16px;
}

.article-modal-img {
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-modal-text {
  font-size: 15.5px;
  line-height: 1.65;
  color: #333;
}

.article-modal-text .lead {
  font-size: 17px;
  font-weight: 500;
  color: var(--color-dark);
}

.article-modal-text hr {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin: 20px 0;
}

.article-modal-footer {
  margin-top: 32px;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  text-align: center;
}

/* =========================================================
   MOBILE DRAWER
   ========================================================= */

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-nav a {
  font-family: var(--font-heading);
  font-size: 20px;
  text-transform: uppercase;
  color: var(--color-dark);
  font-weight: 600;
}

.drawer-nav a:hover {
  color: var(--color-accent-red);
}

.drawer-footer {
  margin-top: 40px;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-phone {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-dark);
}

/* Success Modal */
.success-modal-content {
  text-align: center;
  padding: 20px 10px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #e8f7ed;
  color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.success-modal-content h3 {
  font-size: 24px;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.success-modal-content p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .prod-modal-grid {
    grid-template-columns: 1fr;
  }
  .lightbox-nav-btn {
    display: none;
  }
}

/* Product Modal Gallery Thumbs */
.prod-modal-main-img-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.prod-modal-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.prod-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  opacity: 0.65;
  transition: all 0.2s ease;
}

.prod-thumb:hover, .prod-thumb.active {
  opacity: 1;
  border-color: var(--color-accent-red);
}
