/* ============================================================
   Shop Grid v5 + Single Product Page
   ============================================================ */

/* --- Grid Container --- */
.woocommerce ul.products,
.woocommerce-page ul.products,
ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  padding: 0 !important;
  margin: 20px auto 40px !important;
  list-style: none !important;
  width: 100% !important;
  max-width: 1200px !important;
  float: none !important;
  clear: none !important;
  gap: 0 !important;
}
.woocommerce ul.products::before, .woocommerce ul.products::after,
.woocommerce-page ul.products::before, .woocommerce-page ul.products::after,
ul.products::before, ul.products::after {
  display: none !important; content: none !important;
}
ul.products[class*="columns-"] {
  columns: unset !important; column-gap: 0 !important; column-count: unset !important;
}

/* --- Product Cards --- */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product,
ul.products > li {
  width: auto !important; margin: 15px !important; padding: 0 !important;
  float: none !important; clear: none !important;
  border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column; position: relative;
}
.woocommerce ul.products li.first, .woocommerce ul.products li.last,
ul.products > li:first-child, ul.products > li:last-child {
  clear: none !important; margin: 15px !important;
}
ul.products > li:hover, .woocommerce ul.products li.product:hover {
  transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* --- Card Content --- */
ul.products > li a, .woocommerce ul.products li.product a {
  display: flex !important; flex-direction: column; flex-grow: 1;
  text-decoration: none; color: inherit;
}
ul.products > li a:first-child, .woocommerce ul.products li.product a:first-child { flex-grow: 1; }
.shop-image-wrap, .woocommerce-loop-product__link {
  position: relative; overflow: hidden; height: 250px; line-height: 0;
}
.shop-image, .woocommerce-loop-product__link img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease-in-out; display: block;
}
ul.products > li:hover .shop-image, .woocommerce ul.products li.product:hover img {
  transform: scale(1.05);
}
.shop-info { padding: 20px; background: white; flex-grow: 1; }
.shop-title { font-size: 18px; font-weight: 600; color: #333; margin: 0 0 5px; line-height: 1.3; }
.shop-title a { color: inherit; text-decoration: none; }
.shop-title a:hover { color: #0097fd; }
.shop-price { font-size: 17px; font-weight: 700; color: #0097fd; margin-top: auto; padding-top: 4px; }
ul.products > li .button, ul.products > li .add_to_cart_button,
.woocommerce ul.products li.product .button {
  display: block; margin: 0 20px 20px !important; padding: 10px 16px;
  background: linear-gradient(135deg, #0097fd, #00c4ec);
  color: #fff !important; border: none !important; border-radius: 6px;
  font-weight: 600; font-size: 13px; text-align: center;
  transition: opacity .2s, transform .2s; flex-shrink: 0; text-decoration: none !important;
}
ul.products > li .button:hover { opacity: .88; transform: translateY(-1px); }
.shop-card:hover, .shop-card-link:hover {
  transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.shop-card:hover .shop-image, .shop-card-link:hover .shop-image { transform: scale(1.05); }

/* ============================================================
   Single Product Page
   ============================================================ */

/* Remove sidebar completely */
#sidebar, aside#sidebar, .sidebar { display: none !important; }

/* Product page layout — full width, no sidebar */
.woocommerce div.product,
.woocommerce-page div.product {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Gallery — left side */
.woocommerce div.product div.images,
.woocommerce-page div.product div.images {
  flex: 1 1 45%;
  min-width: 300px;
  float: none !important;
}
.woocommerce-product-gallery {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.woocommerce-product-gallery__wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
}
.woocommerce-product-gallery__image img {
  max-height: 500px;
  object-fit: contain;
  width: auto;
}

/* Summary — right side */
.woocommerce div.product div.summary,
.woocommerce-page div.product div.summary {
  flex: 1 1 45%;
  min-width: 280px;
  float: none !important;
  clear: none !important;
  padding: 0;
}

/* Product title */
.woocommerce div.product h1.product_title,
.product_title {
  font-size: 28px;
  font-weight: 700;
  color: #222;
  margin: 0 0 10px;
  line-height: 1.3;
}

/* Price */
.woocommerce div.product .price,
.price {
  font-size: 26px;
  font-weight: 700;
  color: #0097fd;
  margin-bottom: 20px;
}

/* Cart form */
.woocommerce div.product form.cart,
.cart {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Quantity input */
.woocommerce div.product .quantity,
.quantity {
  display: flex;
  align-items: center;
}
.woocommerce div.product .quantity input,
.quantity input {
  width: 60px;
  height: 44px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}

/* Add to cart button */
.woocommerce div.product .single_add_to_cart_button,
button.single_add_to_cart_button {
  padding: 12px 32px;
  background: linear-gradient(135deg, #0097fd, #00c4ec);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  height: 44px;
}
button.single_add_to_cart_button:hover {
  opacity: .9;
  transform: translateY(-1px);
}

/* Description */
.woocommerce div.product .woocommerce-product-details__short-description,
.woocommerce-product-details__short-description {
  margin-top: 20px;
  color: #555;
  line-height: 1.7;
  font-size: 15px;
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs,
.tabs {
  clear: both;
  margin-top: 40px;
  border-top: 1px solid #eee;
  padding-top: 30px;
}
.woocommerce-tabs ul.tabs {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eee;
}
.woocommerce-tabs ul.tabs li {
  float: none;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  opacity: .5;
  background: transparent;
}
.woocommerce-tabs ul.tabs li.active {
  opacity: 1;
  border-bottom: 2px solid #0097fd;
  margin-bottom: -2px;
}
.woocommerce-tabs ul.tabs li a {
  padding: 12px 24px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  transition: color .2s;
}
.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
  color: #0097fd;
}

/* Related products section */
.woocommerce div.product .related.products,
.related.products {
  clear: both;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}
.related.products h2 {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

/* Breadcrumb */
.woocommerce-breadcrumb {
  margin-bottom: 20px;
  font-size: 14px;
  color: #888;
}
.woocommerce-breadcrumb a {
  color: #0097fd;
  text-decoration: none;
}
.woocommerce-breadcrumb a:hover {
  text-decoration: underline;
}

/* ============================================================
   Pagination (shop page only)
   ============================================================ */
.woocommerce nav.woocommerce-pagination { margin-top: 30px; }
.woocommerce nav.woocommerce-pagination ul {
  border: none !important; display: flex !important; justify-content: center;
  gap: 8px; list-style: none !important; padding: 0 !important; margin: 0 !important;
}
.woocommerce nav.woocommerce-pagination ul li { border: none !important; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  padding: 10px 18px; border: 1px solid #e0e0e0; border-radius: 6px;
  color: #555; text-decoration: none; transition: all .2s; font-size: 14px; background: #fff;
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
  background: #0097fd; color: #fff; border-color: #0097fd;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: #0097fd; color: #fff; border-color: #0097fd;
}
.woocommerce .woocommerce-result-count {
  color: #777; font-size: 14px; max-width: 1200px; margin: 0 auto;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1199px) {
  ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 991px) {
  ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  .shop-image-wrap { height: 200px; }
  .woocommerce div.product { flex-direction: column; gap: 24px; }
  .woocommerce div.product div.images, .woocommerce div.product div.summary {
    flex: 1 1 100%; min-width: auto;
  }
}
@media (max-width: 575px) {
  ul.products { grid-template-columns: 1fr !important; }
  .shop-image-wrap { height: 220px; }
  ul.products > li { margin: 10px !important; }
  .woocommerce div.product h1.product_title { font-size: 22px; }
  .woocommerce div.product .price { font-size: 22px; }
}
