/*!
 * Precision Loom - Main Stylesheet
 * A premium WordPress theme for industrial textile manufacturing
 */

/* ==========================================================================
   Material Symbols Font Face
   ========================================================================== */

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url('../fonts/MaterialSymbolsOutlined-100.ttf) format('truetype');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/MaterialSymbolsOutlined-200.ttf) format('truetype');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/MaterialSymbolsOutlined-300.ttf) format('truetype');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/MaterialSymbolsOutlined-400.ttf) format('truetype');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/MaterialSymbolsOutlined-500.ttf) format('truetype');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/MaterialSymbolsOutlined-600.ttf) format('truetype');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/MaterialSymbolsOutlined-700.ttf) format('truetype');
}

/* ==========================================================================
   Material Symbols Outlined Class
   ========================================================================== */

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined[data-weight="fill"] {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ==========================================================================
   Additional Utility Classes
   ========================================================================== */

/* Hero carousel specific */
#hero-carousel .hero-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stats bar counter spacing */
.counter {
  margin-right: 2px;
}

/* Progress bar labels */
#carouselProgressBar button span {
  display: block;
}

/* Product card hover effects */
.product-card {
  cursor: pointer;
}

.product-card .material-symbols-outlined {
  transition: transform 0.3s ease;
}

.product-card:hover .material-symbols-outlined {
  transform: translateX(4px);
}

/* Workflow card hover */
.workflow-card {
  cursor: default;
}

/* Form focus states */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
}

/* Mobile menu animation */
.mobile-menu-toggle .material-symbols-outlined {
  transition: transform 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .material-symbols-outlined {
  transform: rotate(90deg);
}

/* ==========================================================================
   Full Width Grid Spans
   ========================================================================== */

.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-9 { grid-column: span 9 / span 9; }
.col-span-10 { grid-column: span 10 / span 10; }
.col-span-11 { grid-column: span 11 / span 11; }
.col-span-12 { grid-column: span 12 / span 12; }

@media (min-width: 768px) {
  .md\:col-span-1 { grid-column: span 1 / span 1; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-5 { grid-column: span 5 / span 5; }
  .md\:col-span-6 { grid-column: span 6 / span 6; }
  .md\:col-span-7 { grid-column: span 7 / span 7; }
  .md\:col-span-8 { grid-column: span 8 / span 8; }
  .md\:col-span-9 { grid-column: span 9 / span 9; }
  .md\:col-span-10 { grid-column: span 10 / span 10; }
  .md\:col-span-11 { grid-column: span 11 / span 11; }
  .md\:col-span-12 { grid-column: span 12 / span 12; }
}

/* ==========================================================================
   Border Shadow Effects
   ========================================================================== */

.shadow-border {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.shadow-border-xl {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.shadow-border-2xl {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.hover\:shadow-border-xl:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.hover\:shadow-border-2xl:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* WooCommerce Pagination Styling */
.woocommerce-pagination {
  margin-top: 4rem;
}

.woocommerce-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.woocommerce-pagination ul.page-numbers li {
  display: inline-flex;
}

.woocommerce-pagination ul.page-numbers li a,
.woocommerce-pagination ul.page-numbers li span {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--color-outline, #79747e);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-on-surface, #171c20);
  background: transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.woocommerce-pagination ul.page-numbers li a:hover {
  background: var(--color-surface-container-high, #e4e9ee);
  border-color: var(--color-outline, #79747e);
}

.woocommerce-pagination ul.page-numbers li .page-numbers.current {
  background: var(--color-primary, #00658d);
  border-color: var(--color-primary, #00658d);
  color: var(--color-on-primary, #ffffff);
}

.woocommerce-pagination ul.page-numbers li .page-numbers.dots {
  border: none;
  background: transparent;
}

.woocommerce-pagination ul.page-numbers li .page-numbers.prev,
.woocommerce-pagination ul.page-numbers li .page-numbers.next {
  border: 1px solid var(--color-outline, #79747e);
}

.woocommerce-pagination ul.page-numbers li .page-numbers.prev:hover,
.woocommerce-pagination ul.page-numbers li .page-numbers.next:hover {
  background: var(--color-surface-container-high, #e4e9ee);
}

/* Ensure material symbols display correctly in pagination */
.woocommerce-pagination .material-symbols-outlined {
  font-size: 18px;
}

/* ==========================================================================
   WooCommerce Product Gallery Styling
   ========================================================================== */

/* Main gallery wrapper */
.woocommerce-product-gallery {
  position: relative;
  opacity: 1 !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Main image container */
.woocommerce-product-gallery__wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Main product image - first child is the main image */
.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child,
.woocommerce-product-gallery__wrapper > div:first-child .woocommerce-product-gallery__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.75rem;
  background-color: var(--color-surface-container, #eaeef4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child img,
.woocommerce-product-gallery__wrapper > div:first-child .woocommerce-product-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

/* Thumbnail images - all images after the first one */
.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child),
.woocommerce-product-gallery__wrapper > div:not(:first-child) .woocommerce-product-gallery__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
  border: 2px solid transparent !important;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  background-color: var(--color-surface-container, #eaeef4);
}

.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) img,
.woocommerce-product-gallery__wrapper > div:not(:first-child) .woocommerce-product-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child):hover,
.woocommerce-product-gallery__wrapper > div:not(:first-child) .woocommerce-product-gallery__image:hover {
  border-color: var(--color-primary, #00658d) !important;
  opacity: 0.85;
}

/* Active/selected thumbnail */
.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image.flex-active-slide,
.woocommerce-product-gallery__wrapper > div.flex-active-slide .woocommerce-product-gallery__image {
  border-color: var(--color-primary, #00658d) !important;
}

/* Thumbnail grid layout for all images after the first */
.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
  display: inline-block;
  width: calc(25% - 0.75rem);
  margin-right: 1rem;
  margin-bottom: 0;
}

.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child):nth-child(4n) {
  margin-right: 0;
}

/* Grid wrapper for thumbnails */
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper > div:not(:first-child) {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* Image links in gallery */
.woocommerce-product-gallery__image a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Hide default WooCommerce sale badge */
.woocommerce-product-gallery__image .onsale {
  display: none;
}

/* Zoom trigger button */
.woocommerce-product-gallery__trigger {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.woocommerce-product-gallery__trigger:before {
  font-family: 'Material Symbols Outlined';
  content: 'zoom_in';
  font-size: 1.25rem;
  color: var(--color-on-surface, #171c20);
}

/* Photoswipe container */
.pswp {
  z-index: 9999;
}

/* ==========================================================================
   WooCommerce Single Product Layout
   ========================================================================== */

/* Product page layout */
.single-product #primary {
  padding-top: 0;
}

/* Ensure product summary (right column) aligns with gallery */
.woocommerce-product-gallery + .summary {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Reset WooCommerce default single product layout */
.single-product div.product {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .single-product div.product {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 5rem;
    align-items: start;
  }
}

/* Product title styling */
.woocommerce-product-gallery + .summary .product_title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-on-surface, #171c20);
  font-family: var(--font-family-headline, 'Noto Serif', Georgia, serif);
  margin-bottom: 1rem;
  line-height: 1.2;
}

/* Price styling */
.woocommerce-product-gallery + .summary .price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary, #00658d);
  margin-bottom: 1.5rem;
}

.woocommerce-product-gallery + .summary .price del {
  color: var(--color-on-surface-variant, #3e4850);
  font-size: 1rem;
  margin-right: 0.5rem;
}

.woocommerce-product-gallery + .summary .price ins {
  text-decoration: none;
  color: var(--color-primary, #00658d);
}

/* Short description */
.woocommerce-product-gallery + .summary .woocommerce-product-details__short-description {
  font-size: 1.125rem;
  color: var(--color-on-surface-variant, #3e4850);
  font-family: var(--font-family-body, 'Work Sans', sans-serif);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Add to cart form */
.woocommerce-product-gallery + .summary .cart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.woocommerce-product-gallery + .summary .cart .quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-outline, #79747e);
  border-radius: 0.5rem;
  overflow: hidden;
}

.woocommerce-product-gallery + .summary .cart .quantity .qty {
  width: 4rem;
  text-align: center;
  border: none;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
  background: transparent;
}

.woocommerce-product-gallery + .summary .cart .single_add_to_cart_button {
  background-color: var(--color-primary, #00658d);
  color: var(--color-on-primary, #ffffff);
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.woocommerce-product-gallery + .summary .cart .single_add_to_cart_button:hover {
  background-color: var(--color-primary-container, #00a3e0);
}

/* Product meta */
.woocommerce-product-gallery + .summary .product_meta {
  font-size: 0.875rem;
  color: var(--color-on-surface-variant, #3e4850);
}

.woocommerce-product-gallery + .summary .product_meta .posted_in,
.woocommerce-product-gallery + .summary .product_meta .tagged_as {
  display: block;
  margin-bottom: 0.5rem;
}

.woocommerce-product-gallery + .summary .product_meta a {
  color: var(--color-primary, #00658d);
}

/* Tabs styling */
.woocommerce-tabs {
  margin-top: 2rem;
}

.woocommerce-tabs ul.tabs {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  border-bottom: 1px solid var(--color-outline-variant, #79747e);
}

.woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
}

.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 1rem 0;
  color: var(--color-on-surface-variant, #3e4850);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
  color: var(--color-primary, #00658d);
  border-bottom-color: var(--color-primary, #00658d);
}

.woocommerce-tabs .panel {
  padding: 2rem 0;
}

/* Related products */
.related {
  margin-top: 4rem;
}

.related > h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-on-surface, #171c20);
  font-family: var(--font-family-headline, 'Noto Serif', Georgia, serif);
  margin-bottom: 2rem;
}

/* Upsells */
.up-sells {
  margin-top: 4rem;
}

.up-sells > h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-on-surface, #171c20);
  font-family: var(--font-family-headline, 'Noto Serif', Georgia, serif);
  margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
    width: calc(33.333% - 0.667rem);
  }

  .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child):nth-child(4n) {
    margin-right: 1rem;
  }

  .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child):nth-child(3n) {
    margin-right: 0;
  }
}

/* ==========================================================================
   WooCommerce Tabs Styling
   ========================================================================== */

.woocommerce-tabs {
  margin-top: 2rem;
}

.woocommerce-tabs .tabs {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 0 0;
  border-bottom: 1px solid var(--color-outline-variant, #79747e);
}

.woocommerce-tabs .tabs li {
  margin: 0;
  padding: 0;
}

.woocommerce-tabs .tabs li a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--color-on-surface-variant, #3e4850);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.woocommerce-tabs .tabs li a:hover {
  color: var(--color-primary, #00658d);
}

.woocommerce-tabs .tabs li.active a,
.woocommerce-tabs .tabs li a:focus {
  color: var(--color-primary, #00658d);
  border-bottom-color: var(--color-primary, #00658d);
}

.woocommerce-tabs .panel {
  padding: 2rem 0;
  margin: 0;
}

.woocommerce-tabs .panel h2 {
  font-family: var(--font-family-headline, 'Noto Serif', Georgia, serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-on-surface, #171c20);
  margin-bottom: 1rem;
}

.woocommerce-tabs .panel p {
  color: var(--color-on-surface-variant, #3e4850);
  line-height: 1.7;
}

/* Reviews styling */
.woocommerce-tabs #reviews {
  padding-top: 1rem;
}

.woocommerce-tabs #review_form_wrapper {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-outline-variant, #79747e);
}

