/**
 * Mart Blissful - Responsive Stylesheet
 * Fully Responsive Architecture for Mobile, Tablet, and Desktop
 */

/* ==========================================================================
   GLOBAL RESET & VIEWPORT FIXES
   ========================================================================== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent auto-zoom on iOS inputs */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Container padding responsiveness */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* ==========================================================================
   TOP BARS & HEADER RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-menu-bar {
    display: none !important;
  }

  .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
  }

  .mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 768px) {
  /* Announcement bar */
  .top-announcement-bar {
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
  }

  /* Top green trust bar - horizontally scrollable without breaking page width */
  .top-trust-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 0.35rem 0 !important;
  }
  .top-trust-bar::-webkit-scrollbar {
    display: none !important;
  }
  .trust-bar-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1.25rem !important;
    width: max-content !important;
    padding: 0 0.75rem !important;
  }
  .trust-bar-item {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 0.1rem 0.25rem !important;
  }
  .trust-bar-divider {
    display: none !important;
  }

  /* Main dark header - 2 row layout: row 1 (toggle, logo, actions), row 2 (full-width search) */
  .header-main {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem 0.75rem !important;
    padding: 0.6rem 0 !important;
  }

  .mobile-toggle {
    order: 1 !important;
  }

  .logo-wrapper {
    order: 2 !important;
    margin-right: auto !important;
    margin-left: 0.4rem !important;
  }

  .logo-img {
    height: 38px !important;
    max-width: 170px !important;
  }

  .header-actions {
    order: 3 !important;
    gap: 0.9rem !important;
  }

  .action-icon-wrapper {
    width: 28px !important;
    height: 28px !important;
  }

  .action-svg {
    width: 21px !important;
    height: 21px !important;
  }

  .search-bar-wrapper {
    order: 4 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin: 0.35rem 0 0.1rem 0 !important;
  }

  .search-input-group {
    padding: 0 0.35rem 0 1rem !important;
  }

  .search-input {
    padding: 0.5rem 0 !important;
    font-size: 0.84rem !important;
  }
}

@media (max-width: 480px) {
  .logo-img {
    height: 32px !important;
    max-width: 140px !important;
  }

  .header-actions {
    gap: 0.65rem !important;
  }
}

/* ==========================================================================
   OFF-CANVAS MOBILE NAVIGATION DRAWER
   ========================================================================== */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: -330px;
  width: 82vw;
  max-width: 320px;
  height: 100%;
  background: #12151c;
  z-index: 99999;
  box-shadow: 6px 0 30px rgba(0, 0, 0, 0.6);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.active {
  left: 0;
}

.mobile-nav-header {
  padding: 1.15rem 1.25rem;
  background-color: #0c0e12;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1f242e;
}

.mobile-nav-list {
  list-style: none;
  padding: 0.5rem 0 3rem 0;
  margin: 0;
}

.mobile-menu-heading {
  color: #eab308;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1rem 1.25rem 0.35rem 1.25rem;
  letter-spacing: 0.7px;
}

.mobile-nav-list a {
  display: block;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: #cbd5e1;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s ease;
}

.mobile-nav-list a:hover,
.mobile-nav-list a:active {
  background-color: #1c202a;
  color: #ffffff;
  padding-left: 1.5rem;
}

/* Slide-in cart drawer responsiveness */
@media (max-width: 480px) {
  .cart-drawer {
    width: 100% !important;
    max-width: 100% !important;
    right: -100% !important;
  }
  .cart-drawer.active {
    right: 0 !important;
  }
}

/* ==========================================================================
   HOMEPAGE HERO & SLIDERS RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  #homeBannersContainer img {
    max-height: 380px !important;
  }
}

@media (max-width: 768px) {
  #homeBannersContainer img {
    max-height: 280px !important;
  }
}

@media (max-width: 480px) {
  #homeBannersContainer img {
    max-height: 210px !important;
  }
}

/* Dark Trust Bar Strip */
@media (max-width: 1024px) {
  .trust-dark-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 640px) {
  .trust-dark-strip {
    padding: 1.25rem 0 !important;
  }
  .trust-dark-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .trust-dark-item {
    gap: 0.75rem !important;
  }
  .trust-dark-title {
    font-size: 0.8rem !important;
  }
  .trust-dark-sub {
    font-size: 0.75rem !important;
  }
}

/* Category Slider */
@media (max-width: 768px) {
  .category-slider-wrapper {
    position: relative;
  }
  .category-slider-container {
    gap: 0.85rem !important;
    padding: 0.5rem 0.25rem !important;
  }
  .category-rect-card {
    flex: 0 0 145px !important;
  }
  .category-rect-img-wrapper {
    height: 120px !important;
  }
  .category-rect-title {
    font-size: 0.78rem !important;
  }
  .slider-btn {
    width: 32px !important;
    height: 32px !important;
  }
  .slider-btn.prev {
    left: -8px !important;
  }
  .slider-btn.next {
    right: -8px !important;
  }
}

/* Featured Brands Logo Row */
@media (max-width: 768px) {
  .featured-brands-section {
    padding: 2.5rem 0 !important;
  }
  .featured-brands-title {
    font-size: 1.35rem !important;
  }
  .brands-logo-row {
    min-width: 680px !important;
    gap: 1.75rem !important;
  }
  .brand-logo-img {
    max-height: 28px !important;
    max-width: 90px !important;
  }
}

/* ==========================================================================
   PRODUCT GRIDS RESPONSIVENESS (Best Sellers, Shop, Wishlist)
   ========================================================================== */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }

  .product-card {
    border-radius: 8px !important;
  }

  .product-thumb-link {
    height: 160px !important;
    padding: 0.5rem !important;
  }

  .product-info {
    padding: 0.65rem 0.5rem !important;
  }

  .product-brand {
    font-size: 0.68rem !important;
    margin-bottom: 2px !important;
  }

  .product-title {
    font-size: 0.78rem !important;
    height: 2.2rem !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  .product-rating {
    font-size: 0.7rem !important;
    margin-bottom: 4px !important;
  }

  .product-price-row {
    gap: 4px !important;
    flex-wrap: wrap !important;
    margin-bottom: 8px !important;
  }

  .current-price {
    font-size: 0.92rem !important;
  }

  .was-price {
    font-size: 0.75rem !important;
  }

  .save-amount {
    display: none !important;
  }

  .btn-add-cart {
    padding: 8px 6px !important;
    font-size: 0.76rem !important;
    border-radius: 6px !important;
    gap: 4px !important;
  }

  .btn-add-cart svg {
    width: 13px !important;
    height: 13px !important;
  }

  .btn-wishlist {
    width: 28px !important;
    height: 28px !important;
    top: 6px !important;
    right: 6px !important;
  }

  .btn-wishlist svg {
    width: 14px !important;
    height: 14px !important;
  }

  .badge-sale, .badge-stock {
    font-size: 0.62rem !important;
    padding: 2px 6px !important;
  }
}

@media (max-width: 360px) {
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
}

/* ==========================================================================
   WHAT'S YOUR BLADE TYPE?
   ========================================================================== */
@media (max-width: 1024px) {
  .blade-type-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
  }
}

@media (max-width: 640px) {
  .blade-type-section {
    padding: 2rem 0 3rem 0 !important;
  }
  .blade-type-section h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  .blade-type-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
  .blade-card {
    height: 240px !important;
    border-radius: 8px !important;
  }
  .blade-overlay-box {
    min-height: 64px !important;
    padding: 0.65rem 0.5rem !important;
  }
  .blade-card-title {
    font-size: 0.75rem !important;
    margin-bottom: 3px !important;
  }
  .blade-card-explore {
    font-size: 0.72rem !important;
  }
}

/* ==========================================================================
   SATISFIED CUSTOMERS CAROUSEL
   ========================================================================== */
@media (max-width: 1024px) {
  .satisfied-card {
    flex: 0 0 calc((100% - 1.5rem) / 2) !important;
  }
}

@media (max-width: 640px) {
  .satisfied-customers-section {
    padding: 2.5rem 0 2rem 0 !important;
  }
  .satisfied-customers-section h2 {
    font-size: 1.45rem !important;
  }
  .satisfied-carousel-track {
    gap: 1rem !important;
  }
  .satisfied-card {
    flex: 0 0 92% !important;
    padding: 1.2rem !important;
  }
  .satisfied-comment {
    font-size: 0.82rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.5 !important;
  }
  .satisfied-nav-btn {
    width: 32px !important;
    height: 32px !important;
  }
  .satisfied-nav-btn.prev {
    left: -8px !important;
  }
  .satisfied-nav-btn.next {
    right: -8px !important;
  }
}

/* ==========================================================================
   PRODUCT DETAIL PAGE (ETSY LAYOUT) RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  .etsy-main-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .etsy-buy-panel {
    position: static !important;
    max-width: 100% !important;
  }
}

@media (max-width: 640px) {
  .etsy-product-container {
    padding-top: 1rem !important;
    padding-bottom: 3rem !important;
  }

  .etsy-breadcrumb {
    font-size: 0.76rem !important;
    margin-bottom: 1rem !important;
  }

  .etsy-gallery-wrapper {
    flex-direction: column-reverse !important;
    gap: 0.75rem !important;
  }

  .etsy-thumbnails-col {
    flex-direction: row !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 0.5rem !important;
    padding-bottom: 4px !important;
  }
  .etsy-thumbnails-col::-webkit-scrollbar {
    display: none !important;
  }

  .etsy-thumb-btn {
    width: 56px !important;
    height: 56px !important;
    flex-shrink: 0 !important;
    border-radius: 6px !important;
  }

  .etsy-main-image-box {
    aspect-ratio: 1 / 1 !important;
    border-radius: 10px !important;
  }

  .etsy-nav-arrow {
    width: 36px !important;
    height: 36px !important;
  }

  .etsy-title {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    margin: 0.5rem 0 !important;
  }

  .etsy-now-price {
    font-size: 1.45rem !important;
  }

  .etsy-basket-btn {
    padding: 14px 20px !important;
    font-size: 1.05rem !important;
    border-radius: 8px !important;
  }

  .etsy-reviews-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .etsy-more-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
}

/* ==========================================================================
   SHOP / COLLECTIONS CATALOG PAGE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
  .shop-layout-container {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .shop-filter-sidebar {
    width: 100% !important;
  }

  .shop-top-controls {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
}

/* ==========================================================================
   CART PAGE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
  .cart-page-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .cart-order-summary-card {
    position: static !important;
  }
}

@media (max-width: 640px) {
  .cart-table-head {
    display: none !important;
  }

  .cart-item-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
    position: relative !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .cart-item-product {
    flex: 1 1 100% !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px dashed #E2E8F0 !important;
  }

  .cart-item-price {
    font-size: 0.85rem !important;
    color: #64748B !important;
    text-align: left !important;
  }

  .cart-item-qty {
    display: flex !important;
    justify-content: center !important;
  }

  .cart-item-total {
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-align: right !important;
    color: #111827 !important;
  }
}

/* ==========================================================================
   CHECKOUT PAGE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
  .checkout-page-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .checkout-summary-box {
    position: static !important;
  }
}

@media (max-width: 640px) {
  .checkout-grid-2,
  .checkout-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .checkout-shipping-label,
  .checkout-payment-label {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
}

/* ==========================================================================
   NEWSLETTER POPUP MODAL RESPONSIVENESS
   ========================================================================== */
@media (max-width: 600px) {
  #newsletterPopupContent {
    width: 92% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    border-radius: 10px !important;
  }

  #newsletterPopupContent > div:first-of-type {
    height: 150px !important;
  }

  #newsletterPopupContent h3 {
    font-size: 1.4rem !important;
  }

  #newsletterPopupContent > div:last-of-type {
    padding: 1.25rem !important;
  }
}

/* ==========================================================================
   FOOTER & TRUST BAR STRIP RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.75rem !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2.5rem !important;
  }
}

@media (max-width: 640px) {
  .trust-bar {
    padding: 2.5rem 0 !important;
  }

  .trust-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    text-align: center !important;
  }

  .trust-icon {
    margin: 0 auto 0.75rem auto !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 1.25rem !important;
  }

  .payment-icons {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
}
