/* ==========================================================================
   SHOP PAGE WRAPPER
   ========================================================================== */
.shop-page-wrapper {
  background-color: #fff;
  padding-bottom: 80px;
  position: relative;
  overflow-x: hidden; /* Prevents layout break during drawer animation */
}

/* ==========================================================================
   FILTER DRAWER (Overlay Style)
   ========================================================================== */
.filter-drawer {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 90vh;
  background: #ffffff;
  z-index: 1500;
  border-bottom: 1px solid #eee;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  visibility: hidden;
  padding: 60px 0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.filter-drawer.open {
  top: 0;
  visibility: visible;
}

.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 200px;
  gap: 40px;
}

.filter-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
  border-bottom: 2px solid #0b2341;
  padding-bottom: 8px;
  display: inline-block;
  color: #0b2341;
}

.filter-list {
  list-style: none;
  padding: 0;
}

.filter-list li {
  margin-bottom: 10px;
}

.filter-list li a {
  text-decoration: none;
  color: #666;
  font-size: 14px;
  transition: 0.3s;
}

.filter-list li a:hover {
  color: #0b2341;
  padding-left: 8px;
}

.filter-close-btn {
  cursor: pointer;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  background: #0b2341;
  border: 1px solid #0b2341;
  padding: 12px 25px;
  text-align: center;
  transition: 0.3s;
}

.filter-close-btn:hover {
  background: transparent;
  color: #0b2341;
}

/* ==========================================================================
   TOP CONTROLS
   ========================================================================== */
.shop-top-controls {
  padding: 30px 0;
  border-bottom: 1px solid #f1f1f1;
  background: #fdfdfd;
}

.flex-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.breadcrumb-area {
  font-size: 13px;
  color: #999;
}

.breadcrumb-area a {
  text-decoration: none;
  color: #555;
  transition: 0.2s;
}

.breadcrumb-area a:hover {
  color: #0b2341;
}

.active-sub {
  color: #0b2341;
  font-weight: 700;
}

.result-count {
  font-size: 13px;
  color: #888;
  font-style: italic;
}

.shop-actions {
  display: flex;
  align-items: center;
  gap: 30px;
}

.view-toggles i {
  font-size: 18px;
  color: #ddd;
  cursor: pointer;
  margin-left: 10px;
  transition: 0.3s;
}

.view-toggles i.active {
  color: #0b2341;
}

.filter-toggle {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eee;
  padding: 8px 15px;
  border-radius: 4px;
}

/* ==========================================================================
   SUB-CATEGORY TABS
   ========================================================================== */
.sub-category-nav {
  padding: 20px 0;
}

.sub-cat-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sub-cat-tabs::-webkit-scrollbar {
  display: none;
}

.sub-cat-link {
  white-space: nowrap;
  text-decoration: none;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 30px;
  transition: 0.3s;
}

.sub-cat-link.active,
.sub-cat-link:hover {
  background: #0b2341;
  color: #fff;
  border-color: #0b2341;
}

/* ==========================================================================
   PRODUCT GRID (Default 4 Columns)
   ========================================================================== */
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 20px;
}

.shop-product-card {
  text-align: center;
  position: relative;
}

.card-img-wrap {
  position: relative;
  background: #fbfbfb;
  overflow: hidden;
  margin-bottom: 15px;
  height: 280px; /* Essential for uniform cards */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f2f2f2;
}

.card-img-wrap img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.shop-product-card:hover .card-img-wrap img {
  transform: scale(1.1);
}

/* Hover Action Bar */
.card-hover-actions {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  background: rgba(11, 35, 65, 0.9);
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 0;
  transition: 0.3s ease;
}

.shop-product-card:hover .card-hover-actions {
  bottom: 0;
}

.card-hover-actions a {
  color: #fff;
  font-size: 16px;
  transition: 0.3s;
}

.card-hover-actions a:hover {
  color: #ff9900;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  min-height: 40px; /* Keeps prices aligned */
}

.product-name a {
  text-decoration: none;
  color: #0b2341;
}

.brand-name {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.product-price {
  font-weight: 700;
  font-size: 16px;
  color: #ff9900;
}

/* Hidden in Grid, Shown in List */
.list-description,
.list-add-cart {
  display: none;
}

/* ==========================================================================
   LIST VIEW STYLES
   ========================================================================== */
.shop-product-grid.list-view {
  grid-template-columns: 1fr;
}

.list-view .shop-product-card {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 40px;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
}

.list-view .card-img-wrap {
  width: 250px;
  height: 250px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.list-view .card-hover-actions {
  display: none; /* Hide hover bar in list view */
}

.list-view .product-name {
  font-size: 18px;
  margin-bottom: 10px;
  min-height: auto;
}

.list-view .list-description {
  display: block;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  max-width: 700px;
}

.list-view .list-add-cart {
  display: inline-block;
  background: #0b2341;
  color: #fff;
  border: none;
  padding: 10px 25px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 15px;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.no-products {
  text-align: center;
  padding: 100px 0;
}

.no-products i {
  font-size: 60px;
  color: #eee;
  margin-bottom: 20px;
}

.btn-back-shop {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 35px;
  background: #0b2341;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 4px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .shop-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 850px) {
  .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .drawer-grid {
    grid-template-columns: 1fr;
  }
  .flex-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 550px) {
  .shop-product-grid {
    grid-template-columns: 1fr;
  }
  .list-view .shop-product-card {
    flex-direction: column;
    text-align: center;
  }
  .list-view .card-img-wrap {
    width: 100%;
  }
}
