/* Extra custom styles (Tailwind handles most styling) */
:root {
  --brand: #80A739;
  --brand-dark: #5f7e2a;
  --brand-light: #f0f7e4;
}

/* Toolbar buttons */
.toolbar-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.toolbar-btn:hover {
  background: #f9fafb;
}

/* Tabs */
.tab-btn {
  background: #f3f4f6;
  color: #57595a;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: 0.3s;
  cursor: pointer;
}

/* Hover tab (except active) */
.tab-btn:hover:not(.active-tab) {
  border: 1px solid #80a739;
  color: #80a739;
  background: #f9fafb;
}

/* Active tab */
.active-tab {
  background: #80a739;
  color: white;
}

/* Product card */
.product-card {
  box-shadow: 0 1px 3px #00000020;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.4s;
}

/* Details button hover */
.details-btn:hover {
  background: #80a739;
  color: white;
}

/* ===== GRID VIEW / LIST VIEW ===== */

/* Grid view default */
.grid-view {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}

@media (min-width: 640px) {
  .grid-view {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-view {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* List view */
.list-view {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
  .product-card {
    display: flex !important;
    flex-direction: row !important;
    > div.relative {
      width: 30%;
      img {
        width: 100%;
        height: 200px;
      }
    }
    > div.p-5 {
      width: calc(70% - 24px);
    }
  }
}

/* Product card structure in list view */
.list-view .product-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .list-view .product-card {
    flex-direction: row;
    align-items: stretch;
  }

  .list-view .product-card img {
    width: 280px;
    height: 100%;
    object-fit: cover;
  }
}

.list-view .product-card .p-5 {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ====================================================
Styling For Product Details Page
=====================================================*/
.wrap-product-details {
  /* ===== BREADCRUMB ===== */
    .breadcrumb a { color: #6b7280; font-size: 13px; }
    .breadcrumb a:hover { color: var(--brand); }
    .breadcrumb span { color: #6b7280; font-size: 13px; }

    /* ===== THUMBNAILS ===== */
    .thumb-item {
      cursor: pointer;
      border: 2px solid transparent;
      border-radius: 8px;
      overflow: hidden;
      transition: border-color 0.2s;
    }
    .thumb-item.active,
    .thumb-item:hover { border-color: var(--brand); }

    /* ===== MAIN IMAGE ===== */
    #mainImage {
      transition: opacity 0.25s ease;
    }
    #mainImage.fade { opacity: 0; }

    /* ===== COLOR SWATCHES ===== */
    .color-swatch {
      width: 40px; height: 40px;
      border-radius: 6px;
      border: 2px solid transparent;
      cursor: pointer;
      transition: border-color 0.2s, transform 0.15s;
    }
    .color-swatch:hover { transform: scale(1.08); }
    .color-swatch.active { border-color: var(--brand); }

    /* ===== QUANTITY ===== */
    .qty-btn {
      width: 32px; height: 32px;
      border: 1px solid #d1d5db;
      border-radius: 4px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: all 0.2s;
      font-size: 16px; color: #374151;
    }
    .qty-btn:hover { background: #f3f4f6; }

    /* ===== ADD TO CART ===== */
    .add-to-cart-btn {
      background: var(--brand);
      color: white;
      padding: 14px 32px;
      border-radius: 8px;
      font-weight: 600;
      font-size: 15px;
      letter-spacing: 0.3px;
      transition: all 0.2s, transform 0.15s, box-shadow 0.2s;
      cursor: pointer;
      border: none;
      width: 100%;
    }
    .add-to-cart-btn:hover {
      background: var(--brand-dark);
      transform: translateY(-1px);
      box-shadow: 0 6px 20px #80a73940;
    }
    .add-to-cart-btn:active { transform: translateY(0); }

    /* ===== WISHLIST BTN ===== */
    .wishlist-btn {
      width: 40px; height: 40px;
      border-radius: 50%;
      border: 1.5px solid #d1d5db;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: all 0.2s;
      color: #9ca3af;
    }
    .wishlist-btn:hover, .wishlist-btn.active {
      border-color: #ef4444; color: #ef4444;
    }
    .wishlist-btn.active i { font-weight: 900; }

    /* ===== TAB NAV ===== */
    .tab-nav-btn {
      padding: 10px 0;
      font-size: 14px;
      font-weight: 500;
      color: #6b7280;
      border-bottom: 2px solid transparent;
      cursor: pointer;
      transition: color 0.2s, border-color 0.2s;
      white-space: nowrap;
    }
    .tab-nav-btn:hover { color: var(--brand); }
    .tab-nav-btn.active {
      color: var(--brand);
      border-color: var(--brand);
    }
    .tab-content { display: none; }
    .tab-content.active { display: block; }

    /* ===== RELATED CARD ===== */
    .related-card {
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      overflow: hidden;
      transition: box-shadow 0.25s, transform 0.25s;
      cursor: pointer;
    }
    .related-card:hover {
      box-shadow: 0 8px 24px #00000015;
      transform: translateY(-3px);
    }

    /* ===== OFFER BOX ===== */
    .offer-box {
      background: #fff8f0;
      border: 1px solid #fde68a;
      border-radius: 8px;
      padding: 10px 14px;
    }

    /* ===== SPEC TABLE ===== */
    .spec-table tr:nth-child(even) td { background: #f9fafb; }
    .spec-table td { padding: 9px 14px; font-size: 13.5px; border-bottom: 1px solid #f3f4f6; }
    .spec-table td:first-child { color: #6b7280; width: 45%; }

    /* ===== DELIVERY BADGE ===== */
    .delivery-badge {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 16px;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      font-size: 12px;
      color: #374151;
    }

    /* ===== RELATED SLIDER ===== */
    #relatedSlider {
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      scroll-behavior: smooth;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    #relatedSlider::-webkit-scrollbar { display: none; }
    #relatedSlider .related-card {
      min-width: 200px;
      max-width: 200px;
      flex-shrink: 0;
    }

    .slider-btn {
      width: 32px; height: 32px;
      border-radius: 50%;
      border: 1px solid #e5e7eb;
      background: white;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      box-shadow: 0 2px 6px #0000001a;
      transition: all 0.2s;
      flex-shrink: 0;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 10;
    }
    #slidePrev {
      left: -15px;
    }
    #slideNext {
      right: -15px;
    }
    .slider-btn:hover { background: var(--brand); color: white; }

    /* ===== RATING STARS ===== */
    .stars i { color: var(--brand); font-size: 13px; }

    /* ===== BADGE ===== */
    .badge-green {
      background: var(--brand);
      color: white;
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 4px;
    }

    /* responsive thumbnail scroll */
    #thumbTrack {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 480px;
      overflow-y: auto;
      scrollbar-width: none;
    }
    #thumbTrack::-webkit-scrollbar { display: none; }

    @media (max-width: 640px) {
      #thumbTrack {
        flex-direction: row;
        max-height: unset;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
      }
      #thumbTrack .thumb-item {
        min-width: 60px;
        max-width: 60px;
      }
    }
}