/* Frontend Styles for Casa Larga OrderPort Bridge */

/* Age Gate Modal */
#cl-age-gate-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
}

.cl-age-gate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.cl-age-gate-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cl-age-gate-content h2 {
  margin-top: 0;
  color: #8b0000;
}

.cl-age-gate-buttons {
  margin-top: 20px;
}

.cl-age-gate-buttons .button {
  margin: 0 10px;
  padding: 12px 24px;
}

/* Wine Categories Grid */
.cl-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.cl-category-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cl-category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.cl-category-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.cl-category-content {
  padding: 20px;
}

.cl-category-title {
  margin: 0 0 15px 0;
  font-size: 1.5em;
}

.cl-category-title a {
  color: #8b0000;
  text-decoration: none;
}

.cl-category-title a:hover {
  text-decoration: underline;
}

.cl-category-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.cl-category-meta {
  font-size: 0.9em;
  color: #888;
}

/* Wine List */
.cl-wine-list {
  margin: 30px 0;
}

.cl-wine-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.cl-wine-filters select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

.cl-wine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.cl-wine-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cl-wine-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cl-wine-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.cl-wine-content {
  padding: 20px;
}

.cl-wine-title {
  margin: 0 0 10px 0;
  font-size: 1.2em;
}

.cl-wine-title a {
  color: #8b0000;
  text-decoration: none;
}

.cl-wine-title a:hover {
  text-decoration: underline;
}

.cl-wine-vintage,
.cl-wine-varietal {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 5px;
}

.cl-wine-price {
  margin: 15px 0;
  font-size: 1.1em;
  font-weight: bold;
}

.cl-sale-price {
  color: #8b0000;
}

.cl-original-price {
  color: #999;
  text-decoration: line-through;
  margin-left: 10px;
}

.cl-wine-actions {
  margin-top: 15px;
}

.cl-add-to-cart {
  display: inline-block;
  background: #8b0000;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.cl-add-to-cart:hover {
  background: #660000;
  color: white;
}

/* Wine Detail */
.cl-wine-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.cl-wine-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.cl-wine-main-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.cl-wine-info h1 {
  margin-top: 0;
  color: #8b0000;
}

.cl-wine-vintage {
  font-size: 1.2em;
  color: #666;
  margin: 10px 0;
}

.cl-wine-price {
  font-size: 1.5em;
  font-weight: bold;
  margin: 20px 0;
}

.cl-wine-actions .cl-add-to-cart {
  font-size: 1.1em;
  padding: 15px 30px;
}

.cl-wine-specifications {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  margin: 40px 0;
}

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

.cl-specs-table th,
.cl-specs-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.cl-specs-table th {
  background: #f0f0f0;
  font-weight: bold;
  width: 30%;
}

.cl-wine-tasting-notes,
.cl-wine-production-notes,
.cl-wine-vineyard-notes,
.cl-wine-description {
  margin: 40px 0;
  padding: 30px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.cl-wine-tasting-notes h3,
.cl-wine-production-notes h3,
.cl-wine-vineyard-notes h3,
.cl-wine-description h3 {
  margin-top: 0;
  color: #8b0000;
}

.cl-related-wines {
  margin: 40px 0;
}

.cl-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.cl-related-item {
  text-align: center;
}

.cl-related-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.cl-related-content h4 {
  margin: 10px 0 5px 0;
}

.cl-related-content h4 a {
  color: #8b0000;
  text-decoration: none;
}

.cl-related-price {
  font-weight: bold;
  color: #8b0000;
}

/* Custom Label Builder */
.cl-custom-label-builder {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.cl-builder-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin: 30px 0;
}

.cl-builder-sidebar {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.cl-builder-sidebar h3 {
  margin-top: 0;
  color: #8b0000;
}

.cl-builder-sidebar button {
  background: #8b0000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin: 5px 5px 5px 0;
}

.cl-builder-sidebar button:hover {
  background: #660000;
}

.cl-builder-sidebar input,
.cl-builder-sidebar select {
  width: 100%;
  padding: 8px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cl-canvas-container {
  text-align: center;
  background: white;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

#label-canvas {
  border: 2px solid #ddd;
  border-radius: 4px;
}

.cl-order-form {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-top: 30px;
}

.cl-form-row {
  margin-bottom: 20px;
}

.cl-form-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.cl-form-row input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cl-submit-order {
  background: #8b0000;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.1em;
  border-radius: 4px;
  cursor: pointer;
}

.cl-submit-order:hover {
  background: #660000;
}

/* Pagination */
.cl-pagination {
  text-align: center;
  margin: 40px 0;
}

.cl-pagination ul {
  display: inline-block;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cl-pagination li {
  display: inline-block;
  margin: 0 5px;
}

.cl-pagination a,
.cl-pagination span {
  display: block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #8b0000;
}

.cl-pagination a:hover {
  background: #8b0000;
  color: white;
}

.cl-pagination .current {
  background: #8b0000;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cl-categories-grid {
    grid-template-columns: 1fr;
  }

  .cl-wine-grid {
    grid-template-columns: 1fr;
  }

  .cl-wine-detail-content {
    grid-template-columns: 1fr;
  }

  .cl-builder-container {
    grid-template-columns: 1fr;
  }

  .cl-wine-filters {
    flex-direction: column;
  }

  .cl-age-gate-content {
    width: 95%;
    padding: 20px;
  }
}

/* Cart Messages */
.cl-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  z-index: 10000;
  min-width: 300px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cl-message-success {
  background: #46b450;
}

.cl-message-error {
  background: #dc3232;
}

/* Cart Icon */
.cl-cart-icon {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: #8b0000;
  font-size: 1.2em;
}

.cl-cart-icon:hover {
  color: #660000;
}

.cl-cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #8b0000;
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Cart Page */
.cl-cart-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.cl-cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.cl-cart-table th,
.cl-cart-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.cl-cart-table th {
  background: #f9f9f9;
  font-weight: bold;
}

.cl-cart-qty {
  width: 80px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

.cl-cart-remove {
  background: #dc3232;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cl-cart-remove:hover {
  background: #a00;
}

.cl-cart-total {
  text-align: right;
  font-size: 1.2em;
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 4px;
}

.cl-cart-checkout {
  background: #8b0000;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.1em;
  border-radius: 4px;
  cursor: pointer;
  float: right;
}

.cl-cart-checkout:hover {
  background: #660000;
}

/* Product Grid Improvements */
.cl-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.cl-product-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cl-product-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.cl-product-title {
  margin: 15px;
  font-size: 1.2em;
  color: #8b0000;
}

.cl-product-price {
  margin: 15px;
  font-size: 1.1em;
  font-weight: bold;
}

.cl-product-price .sale-price {
  color: #8b0000;
}

.cl-product-price .regular-price {
  color: #999;
  text-decoration: line-through;
  margin-left: 10px;
}

.cl-product-actions {
  margin: 15px;
  display: flex;
  gap: 10px;
}

.cl-buy-button,
.cl-cart-button {
  flex: 1;
  text-align: center;
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.cl-buy-button {
  background: #8b0000;
  color: white;
}

.cl-buy-button:hover {
  background: #660000;
  color: white;
}

.cl-cart-button {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
}

.cl-cart-button:hover {
  background: #e0e0e0;
  color: #333;
}

/* Categories Grid Improvements */
.cl-categories {
  margin: 30px 0;
}

.cl-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.cl-category-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 20px;
}

.cl-category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.cl-category-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.cl-category-title {
  margin: 0 0 15px 0;
  font-size: 1.5em;
  color: #8b0000;
}

.cl-category-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.cl-category-count {
  color: #888;
  font-size: 0.9em;
  margin-bottom: 15px;
}
