/* assets/css/styles.css */

/* Base Styles - Non-responsive rules */

/* Categories widget styles */
.subcategories-grid,
.products-grid {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.subcategory-item,
.product-item {
  aspect-ratio: 3/4;
  background: none;
  display: flex;
  flex-direction: column;
  align-content: space-between;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

/* Tablet Styles */
@media (max-width: 1024px) {
  .subcategories-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Override Elementor inline styles */
  }
}

/* Mobile Styles */
@media (max-width: 767px) {
  .subcategories-grid,
  .products-grid {
    grid-template-columns: 1fr !important; /* Single column on mobile */
  }
}

.subcategory-item:hover,
.product-item:hover {
  opacity: 0.75;
}

.subcategory-item img,
.product-item img {
  max-width: 100%;
  height: auto;
}

.subcategory-item h3,
.product-item h3 {
  margin-top: 10px;
  font-size: 16px;
  color: #333;
}

.category-section {
  margin-bottom: 40px;
}

.category-section h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #222;
}

/* Subcategory > Products  styles*/
.product-title {
  margin: 10px 0;
  font-size: 16px;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-price {
  color: #333;
  font-weight: 500;
}

/* Sidebar widget styles */
.product-categories-sidebar {
  padding: 0;
}

.product-categories-sidebar .category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-categories-sidebar .category-item {
  margin: 5px 0;
}

.product-categories-sidebar .subcategories {
  list-style: none;
  padding-left: 0;
  margin: 5px 0;
}

.product-categories-sidebar a {
  text-decoration: none;
  color: #333;
}

.product-categories-sidebar .count {
  color: #666;
  font-size: 0.9em;
}

/* Related Products styles */
.related-products-container {
  padding: 20px 0;
}

.related-products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.related-products-header h2 {
  font-size: 24px;
  margin: 0;
  font-weight: 500;
}

.browse-all-link {
  font-size: 14px;
  text-decoration: none;
  color: #1a237e;
  font-weight: 500;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.related-product-item {
  background: #fff;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 16px;
  margin: 0;
  font-weight: 500;
  order: 2;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-image {
  display: block;
  margin-bottom: 15px;
  order: 1;
}

.product-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 1;
}

.product-subtitle {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  order: 3;
}

/* Browse All card styles */
.browse-all-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
}

.browse-all-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1a237e;
  font-weight: 500;
  width: 100%;
  height: 100%;
  order: 2;
}

/* Product attributes table - Adding png- prefix for our custom styles */
/* We'll keep WooCommerce's classes but add our styling with .png-attributes-wrapper */
.png-attributes-wrapper .woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.png-attributes-wrapper .woocommerce-product-attributes th,
.png-attributes-wrapper .woocommerce-product-attributes td {
  background: none !important;
  border: 1px solid #ddd;
  text-align: left;
}

.png-attributes-wrapper .woocommerce-product-attributes-item__label {
  font-weight: 600;
  width: 30%;
}

/* Events list */
.png-custom-events-list {
  margin: 0 auto;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, 'Helvetica Neue', sans-serif;
}

.png-section-title {
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 24px 0;
  color: #000;
}

.png-events-section {
  margin-bottom: 40px;
}

/* Updated to 3-column layout */
.png-event-item {
  display: grid;
  grid-template-columns: 120px minmax(200px, 1fr) minmax(200px, 1fr);
  gap: 24px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  align-items: start;
}

.png-event-date {
  font-size: 14px;
  color: #000;
  font-weight: 500;
}

.png-event-title {
  margin: 0;
  font-size: 16px;
  font-weight: normal;
}

.png-event-title a {
  color: #000;
  text-decoration: none;
}

.png-event-title a:hover {
  text-decoration: underline;
}

.png-event-meta {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.png-event-venue {
  margin-top: 4px;
}

/* Updated responsive styles */
@media (max-width: 767px) {
  .png-event-item {
    grid-template-columns: 90px 1fr;
    gap: 16px;
  }

  /* Meta info moves below title on mobile */
  .png-event-meta {
    grid-column: 2;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .png-event-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .png-event-date {
    margin-bottom: 4px;
  }

  .png-event-meta {
    grid-column: 1;
  }
}

/* Tablet Styles */
@media (max-width: 1024px) {
  /* Related Products - previously 1200px */
  .related-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .browse-all-item {
    display: none; /* Hide on smaller screens */
  }
}

/* Mobile Styles */
@media (max-width: 767px) {
  /* Subcategories Grid - previously 768px */
  .subcategories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Event Items - previously 768px */
  .png-event-item {
    grid-template-columns: 90px 1fr;
    gap: 16px;
  }

  /* Related Products - previously 768px */
  .related-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Product Attributes Table - with png- prefix */
  .png-attributes-wrapper .woocommerce-product-attributes-item__label,
  .png-attributes-wrapper .woocommerce-product-attributes-item__value {
    display: block;
    width: 100%;
  }

  .png-attributes-wrapper .woocommerce-product-attributes-item__label {
    border-bottom: none;
  }

  /* Extra small devices - previously 480px */
  @media (max-width: 480px) {
    .subcategories-grid {
      grid-template-columns: 1fr !important;
    }

    .related-products-grid {
      grid-template-columns: 1fr !important;
    }

    .png-event-item {
      grid-template-columns: 1fr;
      gap: 8px;
    }

    .png-event-date {
      margin-bottom: 4px;
    }
  }
}

.section-divider,
.category-divider {
  border: none;
  width: 100%;
  height: 1px;
}

/* Breadcrumbs */
.custom-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.custom-breadcrumbs a {
  text-decoration: none;
}

.custom-breadcrumbs .separator {
  display: inline-block;
  margin: 0 0.5em;
}

.custom-breadcrumbs .current-item {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 767px) {
  .custom-breadcrumbs {
    font-size: 14px;
  }
}
