/**
 * Shree Ganesh E-Commercio WooCommerce Custom Styling
 * Sinocare-inspired Medical Device Catalog & Checkout
 */

/* ==================== SHOP & CATALOGUE LAYOUT ==================== */
.sgec-shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sgec-space-10);
  align-items: flex-start;
}

.sgec-shop-sidebar {
  background-color: var(--sgec-white);
  border: 1px solid var(--sgec-border);
  border-radius: var(--sgec-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--sgec-shadow-sm);
}

.sgec-shop-sidebar__widget {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--sgec-border-light);
}

.sgec-shop-sidebar__widget:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sgec-shop-sidebar__title {
  font-size: var(--sgec-text-sm);
  font-weight: 800;
  color: var(--sgec-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.sgec-shop-cat-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sgec-shop-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem;
  border-radius: var(--sgec-radius-sm);
  font-size: var(--sgec-text-sm);
  color: var(--sgec-text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--sgec-transition-fast);
}

.sgec-shop-cat-item:hover,
.sgec-shop-cat-item.is-active {
  background-color: var(--sgec-primary-light);
  color: var(--sgec-primary);
  font-weight: 700;
}

.sgec-shop-cat-count {
  font-size: var(--sgec-text-xs);
  background: rgba(18, 59, 93, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: var(--sgec-radius-full);
}

/* Shop Header & Controls */
.sgec-shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--sgec-border-light);
}

.sgec-shop-count {
  font-size: var(--sgec-text-sm);
  color: var(--sgec-text-secondary);
  font-weight: 500;
}

.sgec-shop-sort-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--sgec-border);
  border-radius: var(--sgec-radius-md);
  font-size: var(--sgec-text-sm);
  color: var(--sgec-secondary);
  font-weight: 600;
  background-color: var(--sgec-white);
}

/* Products Grid & WooCommerce Loop Standards */
.sgec-product-grid,
ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sgec-space-6);
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

ul.products li.product {
  list-style: none !important;
  margin: 0 !important;
}

@media (max-width: 1024px) {
  .sgec-product-grid,
  ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .sgec-product-grid,
  ul.products {
    grid-template-columns: 1fr;
  }
}

/* ==================== SINGLE PRODUCT SHOWCASE ==================== */
.sgec-single-product {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sgec-space-16);
  align-items: flex-start;
  margin-bottom: var(--sgec-space-20);
}

.sgec-single-product__gallery {
  position: sticky;
  top: 110px;
}

.sgec-single-product__main-img-wrap {
  background-color: #FAFBFC;
  border: 1px solid var(--sgec-border);
  border-radius: var(--sgec-radius-xl);
  padding: 2.5rem;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
}

.sgec-single-product__main-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  transition: opacity 150ms ease;
}

.sgec-single-product__thumbs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.sgec-single-product__thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--sgec-radius-md);
  border: 2px solid var(--sgec-border);
  background-color: #FAFBFC;
  padding: 0.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--sgec-transition-fast);
  flex-shrink: 0;
}

.sgec-single-product__thumb.is-active,
.sgec-single-product__thumb:hover {
  border-color: var(--sgec-primary);
  box-shadow: 0 0 0 2px var(--sgec-primary-light);
}

.sgec-single-product__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Product Info */
.sgec-single-product__cat-badge {
  display: inline-block;
  background-color: var(--sgec-primary-light);
  color: var(--sgec-primary);
  font-size: var(--sgec-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--sgec-radius-full);
  margin-bottom: 0.85rem;
}

.sgec-single-product__title {
  font-size: clamp(2rem, 2.5vw, 2.75rem);
  font-weight: 800;
  color: var(--sgec-secondary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.sgec-single-product__price-wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--sgec-border-light);
}

.sgec-single-product__price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--sgec-primary);
}

.sgec-single-product__stock-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--sgec-text-xs);
  font-weight: 700;
  color: var(--sgec-success);
  background-color: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--sgec-radius-full);
}

.sgec-single-product__desc {
  font-size: var(--sgec-text-base);
  color: var(--sgec-text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Quantity & Add to Cart */
.sgec-single-product__cart-action {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.sgec-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sgec-border);
  border-radius: var(--sgec-radius-full);
  background-color: var(--sgec-white);
  padding: 0.25rem;
}

.sgec-qty-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--sgec-radius-full);
  border: none;
  background: var(--sgec-bg-pale);
  color: var(--sgec-secondary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--sgec-transition-fast);
}

.sgec-qty-btn:hover {
  background-color: var(--sgec-primary);
  color: var(--sgec-white);
}

.sgec-qty-input {
  width: 48px;
  border: none;
  text-align: center;
  font-family: var(--sgec-font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--sgec-secondary);
  background: transparent;
  outline: none;
}

/* Single Product Badges / Guarantees */
.sgec-single-product__guarantees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--sgec-bg-pale);
  border-radius: var(--sgec-radius-lg);
  border: 1px solid var(--sgec-border);
}

.sgec-guarantee-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--sgec-text-xs);
  font-weight: 700;
  color: var(--sgec-secondary);
}

.sgec-guarantee-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--sgec-primary);
  flex-shrink: 0;
}

/* Tabs & Specifications */
.sgec-product-tabs {
  margin-top: 3rem;
  border-top: 1px solid var(--sgec-border-light);
  padding-top: 3rem;
}

.sgec-tab-nav {
  display: flex;
  gap: 1.5rem;
  border-bottom: 2px solid var(--sgec-border-light);
  margin-bottom: 2rem;
}

.sgec-tab-btn {
  padding: 0.85rem 0.5rem;
  border: none;
  background: none;
  font-family: var(--sgec-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sgec-text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--sgec-transition-fast);
}

.sgec-tab-btn.is-active {
  color: var(--sgec-primary);
}

.sgec-tab-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--sgec-primary);
  border-radius: 3px 3px 0 0;
}

.sgec-tab-pane {
  display: none;
}

.sgec-tab-pane.is-active {
  display: block;
}

/* Specs Table */
.sgec-specs-table {
  width: 100%;
  border-collapse: collapse;
}

.sgec-specs-table tr {
  border-bottom: 1px solid var(--sgec-border-light);
}

.sgec-specs-table th {
  text-align: left;
  padding: 1rem 1rem 1rem 0;
  font-size: var(--sgec-text-sm);
  font-weight: 700;
  color: var(--sgec-secondary);
  width: 35%;
}

.sgec-specs-table td {
  padding: 1rem 0;
  font-size: var(--sgec-text-sm);
  color: var(--sgec-text-secondary);
}

/* ==================== CART & CHECKOUT ==================== */
.sgec-cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: var(--sgec-space-12);
  align-items: flex-start;
}

.sgec-cart-card {
  background-color: var(--sgec-white);
  border: 1px solid var(--sgec-border);
  border-radius: var(--sgec-radius-xl);
  padding: 2.5rem;
  box-shadow: var(--sgec-shadow-sm);
}

.sgec-cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.sgec-cart-table th {
  text-align: left;
  padding-bottom: 1rem;
  font-size: var(--sgec-text-xs);
  text-transform: uppercase;
  color: var(--sgec-text-muted);
  border-bottom: 1px solid var(--sgec-border-light);
}

.sgec-cart-table td {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--sgec-border-light);
  vertical-align: middle;
}

.sgec-cart-item-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sgec-cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--sgec-radius-md);
  background-color: #FAFBFC;
  object-fit: contain;
  padding: 0.25rem;
  border: 1px solid var(--sgec-border);
}

.sgec-cart-item-name {
  font-weight: 700;
  color: var(--sgec-secondary);
  font-size: var(--sgec-text-base);
}

/* Summary Card */
.sgec-summary-card {
  background-color: var(--sgec-bg-pale);
  border: 1px solid var(--sgec-border);
  border-radius: var(--sgec-radius-xl);
  padding: 2.25rem;
}

.sgec-summary-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sgec-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--sgec-border);
}

.sgec-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: var(--sgec-text-sm);
  color: var(--sgec-text-secondary);
}

.sgec-summary-row--total {
  border-top: 2px solid var(--sgec-border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sgec-secondary);
}

.sgec-summary-row--total span:last-child {
  color: var(--sgec-primary);
}

