/* Collections Page Styles */

.brandbook-page {
  background: #fff;
  color: #000;
  min-height: 100vh;

  /* Ink effect configuration - customize as needed */
  --ink-color: #000000;           /* цвет краски */
  --ink-amplitude: 24px;          /* амплитуда волн нижней кромки */
  --ink-wavelength: 320px;        /* длина волны */
  --ink-viscosity: 0.12;          /* вязкость (0..1), влияет на задержку */
  --ink-opacity: 1;               /* прозрачность брызг */
  --ink-coverage: 0.5;            /* доля высоты экрана с брызгами */
  --ink-density: 1.2;             /* 0..1 плотность капель */
  --ink-shadow: rgba(0,0,0,.45);  /* тень объёма */
}

.brandbook-page .site-header {
  background: #fff;
  border-bottom: none;
}

.brandbook-page .main-nav a {
  color: #000;
}

.brandbook-page .ink-watch {
  color: #000;
}

/* Main Content */
.brandbook-main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

.page-title-wrapper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.brandbook-title {
  font-size: 48px;
  letter-spacing: -0.05em;
  margin: 0;
}

.chat-bubble {
  width: 60px;
  height: 60px;
  background: #2c8df7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.chat-bubble:hover {
  transform: scale(1.1);
}

.chat-icon {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

/* Collections Grid */
.collections-grid {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Collection Item */
.collection-item {
  background: #000;
  color: #fff;
  border: 2px solid #000;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.collection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  cursor: pointer;
  user-select: none;
}

.collection-header h2 {
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 0;
}

.expand-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.collection-item.expanded .expand-btn {
  transform: rotate(180deg);
}

/* Coming Soon */
.collection-item.coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
}

.collection-item.coming-soon .collection-header {
  cursor: default;
  padding: 16px 32px;
  justify-content: center;
}

.collection-item.coming-soon .collection-header h2 {
  font-size: 32px;
}

/* Collection Content */
.collection-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease;
  opacity: 0;
}

.collection-item.expanded .collection-content {
  max-height: 1200px;
  padding: 0 32px 32px 32px;
  opacity: 1;
}

/* Product Showcase */
.product-showcase {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  animation: slideIn 0.6s ease forwards;
  align-items: start;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-image {
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-image:hover img {
  transform: scale(1.05);
}

/* Product Image Gallery */
.product-image-gallery {
  width: 100%;
  position: relative;
  border-radius: 8px;
  background: #f5f5f5;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.gallery-main-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-main-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.gallery-main-image img.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-family: 'Archivo Black', sans-serif;
  backdrop-filter: blur(4px);
}

/* Gallery Navigation Buttons */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 2px solid #000;
  color: #000;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-nav:hover {
  background: #000;
  color: #fff;
  transform: translateY(-50%) translateX(0) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-nav-prev {
  left: 24px;
}

.gallery-nav-prev:hover {
  transform: translateY(-50%) translateX(-4px) scale(1.05);
}

.gallery-nav-next {
  right: 24px;
}

.gallery-nav-next:hover {
  transform: translateY(-50%) translateX(4px) scale(1.05);
}

.gallery-nav svg {
  width: 28px;
  height: 28px;
}

/* Product Details */
.product-details {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 0;
  position: sticky;
  top: 120px;
}

.product-info {
  border-bottom: 2px solid #333;
  padding-bottom: 28px;
}

.product-name {
  font-size: 38px;
  letter-spacing: -0.02em;
  margin: 0 0 16px 0;
  line-height: 1.1;
}

.product-price {
  font-size: 28px;
  color: #fff;
  margin: 0;
  font-weight: 700;
}

.product-description {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #ccc;
  font-weight: 400;
}

.product-description p {
  margin: 0;
}

/* Size Selector */
.size-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.size-label {
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 0;
  color: #999;
}

.size-options {
  display: inline-flex;
  background: #1a1a1a;
  border-radius: 50px;
  padding: 4px;
  gap: 4px;
  width: fit-content;
}

.size-btn {
  background: transparent;
  border: none;
  color: #999;
  padding: 14px 32px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  border-radius: 50px;
  letter-spacing: 0.05em;
}

.size-btn:hover:not(:disabled) {
  color: #fff;
}

.size-btn.selected {
  background: #fff;
  color: #000;
}

.size-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Add to Cart Button */
.add-to-cart-btn {
  display: inline-block;
  background: #fff;
  color: #000;
  border: none;
  padding: 20px 40px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  text-decoration: none;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.order-btn:hover {
  background: #f0f0f0;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.4);
}

.order-btn:active {
  transform: translateY(-1px);
}

/* Add to Cart Button */
.add-to-cart-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 18px 32px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.add-to-cart-btn:hover:not(:disabled) {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.add-to-cart-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

.add-to-cart-btn.in-cart {
  background: #000;
  color: #fff;
  border: 2px solid #fff;
}

/* Product Description */
.product-description {
  border-top: 1px solid #333;
  padding-top: 24px;
  margin-top: auto;
}

.product-description p {
  font-size: 14px;
  line-height: 1.6;
  color: #999;
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 400;
}

/* Footer on white background */
.brandbook-page .site-footer {
  background: #fff;
}

.brandbook-page .footer-badge a {
  color: #fff;
}

.brandbook-page .footer-copy {
  color: #000;
}

/* Responsive */
@media (max-width: 900px) {
  .brandbook-title {
    font-size: 32px;
  }

  .product-showcase {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .collection-header {
    padding: 20px 24px;
  }

  .collection-header h2 {
    font-size: 22px;
  }

  .collection-item.expanded .collection-content {
    padding: 0 24px 24px 24px;
  }

  .product-name {
    font-size: 24px;
  }

  .product-price {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .page-title-wrapper {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .brandbook-title {
    font-size: 28px;
  }

  .chat-bubble {
    width: 50px;
    height: 50px;
  }

  .chat-icon {
    width: 24px;
    height: 24px;
  }

  .collection-header {
    padding: 16px 20px;
  }

  .collection-header h2 {
    font-size: 18px;
  }

  .product-showcase {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-details {
    position: relative;
    top: 0;
  }

  .product-name {
    font-size: 28px;
  }

  .product-price {
    font-size: 22px;
  }

  .gallery-nav {
    width: 48px;
    height: 48px;
  }

  .gallery-nav svg {
    width: 22px;
    height: 22px;
  }

  .gallery-nav-prev {
    left: 12px;
  }

  .gallery-nav-next {
    right: 12px;
  }

  .collection-item.expanded .collection-content {
    padding: 0 20px 20px 20px;
  }

  .original-product-details {
    gap: 24px;
  }

  .product-name {
    font-size: 20px;
  }

  .product-price {
    font-size: 18px;
  }

  .size-btn {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 50px;
  }

  .add-to-cart-btn {
    padding: 16px 24px;
    font-size: 16px;
  }
}

/* Cart Modal */
.cart-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.cart-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cart-content {
  background: #000;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  border: 2px solid #fff;
  overflow-y: auto;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #333;
  position: sticky;
  top: 0;
  background: #000;
  z-index: 10;
}

.cart-header h2 {
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 0;
  color: #fff;
}

.cart-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.cart-close:hover {
  transform: rotate(90deg);
}

.cart-body {
  padding: 32px;
}

.cart-order-section h3 {
  font-size: 18px;
  letter-spacing: 0.05em;
  margin: 0 0 20px 0;
  color: #fff;
}

.cart-product {
  display: flex;
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: #111;
  border-radius: 8px;
  margin-bottom: 32px;
}

.cart-product-image {
  width: 80px;
  height: 100px;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-product-info {
  flex: 1;
  color: #fff;
}

.cart-product-name {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px 0;
}

.cart-product-size {
  font-size: 14px;
  color: #999;
  margin: 0 0 12px 0;
}

.cart-product-price {
  font-size: 18px;
  margin: 0;
}

/* Cart Form */
.cart-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-form input,
.cart-form textarea {
  background: #111;
  border: 1px solid #333;
  color: #fff;
  padding: 16px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.cart-form input:focus,
.cart-form textarea:focus {
  outline: none;
  border-color: #fff;
}

.cart-form input::placeholder,
.cart-form textarea::placeholder {
  color: #666;
}

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

/* Cart Total */
.cart-total {
  margin: 24px 0;
  padding: 20px;
  background: #111;
  border-radius: 8px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #999;
  font-size: 14px;
}

.cart-total-row span:last-child {
  color: #fff;
  font-size: 16px;
}

.cart-total-final {
  border-top: 1px solid #333;
  margin-top: 12px;
  padding-top: 16px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 16px;
  color: #fff;
}

.cart-total-final span {
  font-size: 20px !important;
  color: #fff !important;
}

/* Pay Button */
.cart-pay-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 18px 32px;
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.cart-pay-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

/* Responsive Cart */
@media (max-width: 520px) {
  .cart-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border: none;
  }

  .cart-header {
    padding: 20px;
  }

  .cart-header h2 {
    font-size: 24px;
  }

  .cart-body {
    padding: 20px;
  }

  .cart-product {
    padding: 16px;
  }

  .cart-product-image {
    width: 60px;
    height: 80px;
  }

  .cart-form input,
  .cart-form textarea {
    padding: 14px;
    font-size: 14px;
  }

  .cart-pay-btn {
    padding: 16px 24px;
    font-size: 16px;
  }
}
