/* ==========================================================================
   ১. রেগুলার / গ্লোবাল স্টাইলস
   ========================================================================== */
div.ctg_title h6 {
    font-weight: 400;
    text-transform: uppercase;
}
.address_area_custom_value {
    border: 1px solid #fa832e;
    padding: 6px;
    width: 100%;
}

/* ==========================================================================
   ২. MAX-WIDTH মিডিয়া কোয়েরি (বড় থেকে ছোট স্ক্রিন অনুযায়ী সাজানো)

   ⚠️ গুরুত্বপূর্ণ কারণ: CSS একই specificity-এর rule গুলোর মধ্যে যেটা ফাইলে
   *পরে* আসে সেটাই জিতে যায় (cascade)। max-width মিডিয়া কোয়েরিতে একাধিক
   breakpoint ওভারল্যাপ করে (যেমন ৪০০px স্ক্রিন একই সাথে max-width:480px
   এবং max-width:768px উভয় ব্লকেই পড়ে)। তাই সবসময় বড় breakpoint আগে,
   ছোট breakpoint পরে লিখতে হয় — যাতে ছোট স্ক্রিনের জন্য নির্দিষ্ট মান
   শেষে এসে জিতে যায় এবং সঠিকভাবে override করে।

   আগের ফাইলে অর্ডার ছিল: 375 → 480 → 768 → 992  (ছোট থেকে বড়)
   এতে .footer-content, .slider এর মতো rule গুলোতে বড় breakpoint এর মান
   ছোট স্ক্রিনেও প্রয়োগ হয়ে যাচ্ছিল (বাগ)।

   ঠিক করা অর্ডার: 992 → 768 → 480 → 375  (বড় থেকে ছোট)
   ========================================================================== */

/* ---- max-width: 992px (Large Screens / Laptops) ---- */
@media screen and (max-width: 992px) {
  .img-select {
    flex-direction: row;
    justify-content: flex-start;
  }

  .media-container {
    padding: 0;
  }

  .img-item img {
    height: 83px;
  }

  .media-container iframe,
  .media-container img {
    width: 100%;
    height: 439px !important;
  }
}

/* ---- max-width: 768px (Tablets) ---- */
@media (max-width: 768px) {
  /* Navbar & Menu */
  .navbar {
    flex-direction: column;
    text-align: center;
  }

  .menu {
    flex-direction: column;
    margin-top: 10px;
  }

  .menu li {
    margin: 5px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  /* Hero Section */
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Product View */
  .product-view {
    flex-direction: column;
  }

  .product-images {
    flex-direction: column-reverse;
  }

  .thumbnail-list {
    flex-direction: row;
    justify-content: center;
  }

  /* Shopping & Cart */
  .shopping-container {
    display: flex;
    gap: 2rem;
    justify-content: space-around;
    flex-direction: column;
  }

  .container {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .quantity-controls,
  .price,
  .total {
    grid-column: 2;
  }

  /* Footer (Tablet mode - base override, mobile এ .footer-content আরও নিচে override হবে) */
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .slider {
    margin-top: 75px;
  }
}

/* ---- max-width: 480px (Mobile Devices) ---- */
@media (max-width: 480px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .search_logo_itemArea.px-16.md\:px-16.sm\:px-0.text-orange-400.grid.grid-cols-3.items-center.place-content-center.bg-black-200 {
    padding: 0 19px 0 0;
    height: 50px;
  }

  .slider {
    position: relative;
    height: 180px;
    width: 100%;
    overflow: hidden;
    margin-top: 50px;
  }

 .wishlist-btn {
    top: 48%;
    font-size: 14px !important;
}

  .product_items .cart .body .desArea .allPrice {
    text-align: left;
    font-size: 12px;
  }

  .product_items .cart .body .desArea .title {
    text-align: left;
  }

  /* Note: এখানে উইডথ ১৫০px রাখা হয়েছে কারণ এটি নিচের ব্লকে ওভাররাইড হচ্ছিল */
  .product_items .cart .body {
    width: 171px;
  }

  .product_items .cart .body .quick_view {
    width: 100%;
  }

  .product-view-review_reletedProduct {
    flex-wrap: wrap;
  }

  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(107px, 1fr));
  }

  .cart_view.flex.justify-between {
    display: flex;
    flex-direction: row;
    gap: 0;
  }
  .cart_view.flex.justify-between {
    padding: 0px 9px 9px 9px;
}
.product_items .cart .body button {
    font-size: 10px;
}
.product_items .cart .body .old_price {
    font-size: 13px;
}
.product_items .cart .body .price  {
    font-size: 13px;
}

  .searchIcon.text-left {
    width: 207px;
  }

  form.search {
    height: 50px;
    padding: 13px 0 0 0;
    background: transparent;
  }

  .search input[type='search'] {
    height: 21px;
    font-size: 12px;
    width: 168px;
  }

  div#search_result {
    position: absolute;
    width: 209px;
    background: white;
    /* margin: 0 18px; */
  }

  div#search_result div a {
    padding: inherit;
    font-size: 12px;
  }
}

/* ---- max-width: 375px (Very Small Devices) ---- */
@media (max-width: 375px) {
  .search_logo_itemArea.px-16.md\:px-16.sm\:px-0.text-orange-400.grid.grid-cols-3.items-center.place-content-center.bg-black-200 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .slider-nav {
    height: 2rem;
  }

  .product .HeadTitle {
    text-align: center;
    font-size: 17px;
  }

  .product_items .cart .body .product_img {
    height: 163px;
    width: 100%;
  }

  .wishlist-btn {
    top: 48%;
    right: 10px;
  }

  .product_items .cart .body .desArea {
    margin-top: 6px;
    padding: 0px 7px;
  }

  .product_items .cart .body .desArea .title {
    font-size: 13px;
    font-family: sans-serif;
    margin-bottom: 4px;
  }

  .slider.cursor-grab.select-none {
    margin-top: 49px;
  }

  div.ctg_title h6 {
    font-size: 19px;
    text-align: center;
  }

  .delivery-area-section-form {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
 div.ctg_title h6 {
    font-size: 19px;
    text-align: center;
  }
  .product .HeadTitle {
    text-align: center;
    font-size: 19px;
}
}

/* ==========================================================================
   ৩. MIN-WIDTH মিডিয়া কোয়েরি (ছোট থেকে বড় স্ক্রিন অনুযায়ী সাজানো - Mobile First)
   ========================================================================== */

/* ---- min-width: 768px (Category Grid) ---- */
@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ---- min-width: 769px ---- */
@media (min-width: 769px) {
  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-form input {
    flex: 1;
  }

  .newsletter-form button {
    width: auto;
    padding: 0.75rem 1.5rem;
  }
}

/* ---- min-width: 992px (Card View) ---- */
@media screen and (min-width: 992px) {
  .card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1.5rem;
  }

  .card-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .product-imgs {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    flex-direction: row-reverse;
  }

  .product-content {
    padding-top: 0;
  }
}

/* ---- min-width: 1024px (Large Desktop Category Grid) ---- */
@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}