/* ========================================
   MOBILE RESPONSIVE FIXES - All Devices
   ======================================== */

/* ===== Mobile Only Styles (up to 767px) ===== */
@media only screen and (max-width: 767px) {

  /* ===== RESET & CONTAINER ===== */
  body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
  }

  html {
    overflow-x: hidden !important;
  }

  .container {
    width: 100% !important;
    max-width: 100%;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin: 0 auto;
    overflow-x: hidden;
  }

  /* Prevent horizontal scroll */
  .page,
  html,
  body,
  .main-wrapper {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* ===== MOBILE HEADER & NAV ===== */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 0 15px;
  }

  .mobile-header-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    /* Added slight padding */
  }

  .mobile-logo img {
    height: 35px;
    width: auto;
  }

  .mobile-location {
    position: relative;
  }

  .location-btn {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
  }

  .location-text {
    margin: 0 6px;
    font-weight: 600;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-location-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 8px;
    min-width: 150px;
    z-index: 1001;
    overflow: hidden;
  }

  .mobile-location-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 15px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
  }

  .mobile-location-dropdown button:last-child {
    border-bottom: none;
  }

  .mobile-location-dropdown button:active {
    background: #f5f5f5;
  }

  /* ===== MOBILE BOTTOM NAVIGATION ===== */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 10px;
    width: 25%;
    height: 100%;
    transition: color 0.2s;
  }

  .mobile-nav-item.active {
    color: #d11243;
  }

  .mobile-nav-item .icon-wrapper {
    position: relative;
    margin-bottom: 4px;
  }

  .mobile-nav-item .nav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #d11243;
    color: #fff;
    font-size: 9px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 4px;
  }

  .mobile-nav-item .nav-label {
    font-size: 11px;
    margin-top: 2px;
  }

  /* ===== MAIN CONTENT SPACING ===== */
  main {
    padding-top: 60px !important;
    padding-bottom: 70px !important;
    min-height: calc(100vh - 130px);
  }

  /* ===== CATEGORY SECTION ===== */
  .categories {
    padding: 15px 0;
  }

  .categories .container {
    padding: 0 10px;
  }

  .categories .col-md-3,
  .categories .images {
    width: 50% !important;
    float: left;
    padding: 5px !important;
    margin-bottom: 10px;
  }

  .category-images,
  .category-images-video,
  .category-images-pro {
    width: 100%;
    height: auto;
    min-height: 140px;
    border-radius: 8px;
    overflow: hidden;
  }

  .category-images img,
  .category-images-pro img {
    width: 100%;
    height: 140px;
    object-fit: cover;
  }

  .category-images-video iframe {
    width: 100%;
    height: 140px;
  }

  .category-images .links,
  .category-images .links-chic,
  .category-images .links-sea {
    font-size: 14px !important;
    padding: 6px 12px !important;
  }

  .category-images h3 {
    font-size: 11px !important;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .category-images h3 span {
    display: inline;
    font-size: 11px !important;
  }

  /* Fix Grid Overflow */
  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-sm-6,
  .col-xs-12 {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ===== ORDERS/COUPONS SECTION ===== */
  .orders {
    padding: 15px 0;
  }

  .orders .col-md-6 {
    width: 100% !important;
    float: none;
    margin-bottom: 15px;
  }

  .first-order,
  .frozen-food {
    width: 100%;
  }

  .offer h2 {
    font-size: 18px !important;
  }

  .offer h2 span {
    font-size: 16px !important;
  }

  .purchase-order h3 {
    font-size: 12px !important;
    line-height: 1.4;
  }

  .frozen-offer h2 {
    font-size: 16px !important;
  }

  .frozen-offer h2 span {
    font-size: 14px !important;
  }

  .shop-link a {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }

  /* ===== BEST SELLERS SECTION ===== */
  .best-sellars {
    padding: 20px 0;
  }

  .sellars-heading {
    margin-bottom: 20px;
  }

  .sellars-heading span {
    font-size: 18px !important;
    padding: 8px 16px !important;
  }

  /* ===== PRODUCT GRID - 2 COLUMNS ===== */
  .row {
    margin-left: -5px;
    margin-right: -5px;
  }

  .col-md-3,
  .col-sm-6,
  .col-xs-6 {
    width: 50% !important;
    float: left;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-bottom: 15px !important;
  }

  .col-xs-12 {
    width: 100% !important;
    float: left;
    margin-bottom: 15px !important;
  }

  /* Footer Links Stack */
  .footer-links-nav li {
    border-right: none !important;
    display: block !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0 !important;
    text-align: center;
  }

  .footer-links-nav li:last-child {
    border-bottom: none;
  }

  /* Full width for specific sections */
  .sellars-heading .col-md-12,
  .sellars-heading .col-sm-12,
  .sellars-heading .col-xs-12 {
    width: 100% !important;
  }

  /* ===== PRODUCT CARD ===== */
  .product-card {
    padding: 12px !important;
    margin-bottom: 10px !important;
    min-height: 280px;
    border-radius: 8px;
  }

  .product-card img {
    height: 130px !important;
    width: 100%;
    object-fit: contain;
  }

  .product-card h3 {
    font-size: 14px !important;
    line-height: 1.3;
    min-height: 38px !important;
    margin-bottom: 8px !important;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-card .price-info span {
    font-size: 15px !important;
  }

  .add-cart-button {
    padding: 8px 12px !important;
    font-size: 11px !important;
    width: 100%;
  }

  /* ===== VIDEO BANNER ===== */
  .recipe-videos {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .recipe-videos img {
    width: 100%;
    height: auto;
  }

  /* ===== CERTIFICATES SECTION ===== */
  .certificate,
  .transport {
    margin-bottom: 20px;
  }

  .certificate ul,
  .transport ul {
    padding-left: 20px;
  }

  .certificate ul li,
  .transport ul li {
    font-size: 13px !important;
    line-height: 1.6;
    margin-bottom: 8px;
  }

  /* ===== CATEGORY PAGE ===== */
  .category-header {
    width: 100% !important;
    padding: 15px !important;
  }

  .category-title {
    font-size: 20px !important;
    margin-bottom: 10px;
  }

  .category-filter {
    width: 100% !important;
    margin-bottom: 15px;
  }

  .filter-button {
    width: 100%;
    margin-bottom: 10px;
  }

  /* ===== SEARCH PAGE ===== */
  .search-header {
    padding: 15px;
  }

  .search-input {
    width: 100%;
    margin-bottom: 15px;
  }

  .search-results .col-md-3 {
    width: 50% !important;
  }

  .search-results .row {
    margin: 0 -5px;
  }

  /* ===== CHECKOUT PAGE ===== */
  .checkout-section {
    padding: 15px 0;
  }

  .checkout-form {
    width: 100% !important;
    padding: 15px;
  }

  .checkout-form .form-group {
    margin-bottom: 15px;
  }

  .checkout-form label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
  }

  .checkout-form input,
  .checkout-form select,
  .checkout-form textarea {
    width: 100% !important;
    font-size: 14px !important;
    padding: 10px !important;
    border: 1px solid #ddd;
    border-radius: 6px;
  }

  .checkout-form textarea {
    min-height: 80px;
  }

  .order-summary {
    width: 100% !important;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-top: 20px;
  }

  .order-summary h3 {
    font-size: 18px !important;
    margin-bottom: 15px;
  }

  .order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
  }

  .order-total {
    font-size: 18px !important;
    font-weight: bold;
    color: #d11243;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
  }

  .place-order-button {
    width: 100%;
    padding: 14px !important;
    font-size: 16px !important;
    font-weight: bold;
    margin-top: 20px;
    background: #d11243;
    color: #fff;
    border: none;
    border-radius: 8px;
  }

  /* ===== ACCOUNT PAGES ===== */
  .account-container {
    padding: 15px;
  }

  .account-sidebar {
    width: 100% !important;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
  }

  .account-nav {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .account-nav li {
    border-bottom: 1px solid #eee;
  }

  .account-nav li:last-child {
    border-bottom: none;
  }

  .account-nav a {
    display: block;
    padding: 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
  }

  .account-nav a.active,
  .account-nav a:active {
    background: #f8f8f8;
    color: #d11243;
    font-weight: 600;
  }

  .account-content {
    width: 100% !important;
    padding: 0;
  }

  .account-section {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .account-section h2 {
    font-size: 18px !important;
    margin-bottom: 15px;
  }

  .account-section h3 {
    font-size: 16px !important;
    margin-bottom: 10px;
  }

  .account-info-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
  }

  .account-info-item:last-child {
    border-bottom: none;
  }

  .account-info-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
  }

  .account-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
  }

  /* Address Cards */
  .address-card {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .address-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
  }

  .address-card p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
  }

  .address-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
  }

  .address-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
  }

  /* Orders List */
  .order-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
  }

  .order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }

  .order-id {
    font-size: 13px;
    font-weight: 600;
    color: #333;
  }

  .order-date {
    font-size: 12px;
    color: #666;
  }

  .order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .order-status.pending {
    background: #fff3cd;
    color: #856404;
  }

  .order-status.confirmed {
    background: #d1ecf1;
    color: #0c5460;
  }

  .order-status.delivered {
    background: #d4edda;
    color: #155724;
  }

  .order-items {
    margin: 10px 0;
  }

  .order-item-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .order-item-row img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
  }

  .order-item-details {
    flex: 1;
  }

  .order-total-amount {
    font-size: 16px;
    font-weight: bold;
    color: #d11243;
    text-align: right;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
  }

  .order-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
  }

  .order-actions button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
  }

  /* ===== BREADCRUMBS ===== */
  .breadcrumps-bg {
    padding: 10px 0;
  }

  .breadcrumb {
    background: none;
    padding: 8px 15px;
    margin-bottom: 0;
  }

  .breadcrumb li {
    font-size: 12px;
  }

  /* ===== PRODUCT DETAIL PAGE ===== */
  .mutton-section {
    padding: 15px 0;
  }

  .mutton-list {
    width: 100% !important;
    margin-bottom: 10px;
  }

  .mutton-list p {
    font-size: 16px !important;
    padding: 10px 15px !important;
  }

  .strip {
    display: none;
  }

  .mutton-content {
    width: 100% !important;
    padding: 0 10px !important;
  }

  .mutton-content .col-md-5,
  .mutton-content .col-md-7 {
    width: 100% !important;
    float: none;
    padding: 0 !important;
  }

  .mutton-img {
    width: 100% !important;
    margin-bottom: 15px;
    text-align: center;
  }

  .mutton-img img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
  }

  .shipping-img,
  .check-availability {
    width: 100% !important;
    margin-bottom: 15px;
  }

  .check-availability form {
    width: 100%;
    float: none !important;
  }

  .check-availability .form-group {
    width: 100%;
    display: block;
    margin-bottom: 10px;
  }

  .check-availability .form-control {
    width: 100% !important;
    margin-top: 5px;
  }

  .check-button {
    width: 100%;
    margin-top: 10px;
  }

  .product-detail-info {
    padding: 15px;
  }

  .product-detail-info h1,
  .product-detail-info h2 {
    font-size: 18px !important;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  .weight-selector {
    flex-wrap: wrap;
    gap: 10px;
  }

  .weight-option {
    min-width: calc(50% - 5px);
    margin-bottom: 10px;
    padding: 10px;
    font-size: 13px;
  }

  .product-description,
  .freshness-notes {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
  }

  /* ===== CART PAGE ===== */
  .mutton-curry-cut {
    width: 100% !important;
    margin-bottom: 15px !important;
    padding: 10px !important;
    border: 1px solid #eee;
    border-radius: 8px;
  }

  .mutton-list {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    list-style: none;
  }

  .mutton-list li {
    width: 100% !important;
    margin-bottom: 10px;
    padding: 5px 0;
  }

  .mutton-list li img {
    max-width: 80px;
    height: auto;
  }

  .mutton-list li.details h2 {
    font-size: 16px !important;
    margin: 0;
  }

  .halal-drop-down .dropdown {
    width: 100%;
  }

  .halal-drop-down .btn {
    width: 100%;
    text-align: left;
  }

  .mutton-curry-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .mutton-curry-content .form-control {
    width: 60px !important;
    text-align: center;
  }

  .mutton-curry-content em {
    font-size: 16px;
    font-weight: bold;
    color: #d11243;
  }

  /* Cart Summary */
  .cart-summary {
    width: 100% !important;
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
  }

  .cart-summary h3 {
    font-size: 18px !important;
    margin-bottom: 15px;
  }

  .cart-total {
    font-size: 20px !important;
    font-weight: bold;
    color: #d11243;
    margin: 15px 0;
  }

  .proceed-button {
    width: 100%;
    padding: 12px !important;
    font-size: 16px !important;
  }

  /* ===== UTILITY CLASSES ===== */
  .text-center {
    text-align: center !important;
  }

  .pull-left,
  .pull-right {
    float: none !important;
    display: inline-block;
  }

  /* ===== BUTTONS ===== */
  .btn {
    font-size: 14px !important;
    padding: 10px 16px !important;
  }

  .btn-block {
    width: 100%;
    display: block;
  }

  /* ===== FORMS ===== */
  .form-control {
    font-size: 14px !important;
    height: 40px !important;
  }

  textarea.form-control {
    min-height: 80px !important;
  }

  /* ===== HIDE DESKTOP ELEMENTS ===== */
  .top-header,
  .second-header,
  .search,
  .hidden-xs {
    display: none !important;
  }

  /* ===== SHOW MOBILE ELEMENTS ===== */
  .visible-xs {
    display: block !important;
  }
}

/* ===== Tablet Landscape (768px - 991px) ===== */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .col-md-3 {
    width: 33.33%;
  }

  .col-md-6 {
    width: 50%;
  }

  .product-card {
    min-height: 320px;
  }
}

/* ===== Small Tablets & Large Phones (481px - 767px) ===== */
@media only screen and (min-width: 481px) and (max-width: 767px) {
  .mobile-logo img {
    height: 40px;
  }

  .location-text {
    max-width: 120px;
  }

  .product-card {
    min-height: 300px;
  }

  .product-card img {
    height: 150px !important;
  }

  .product-card h3 {
    font-size: 15px !important;
  }
}

/* ===== Extra Small Phones (up to 480px) ===== */
@media only screen and (max-width: 480px) {
  .mobile-logo img {
    height: 32px;
  }

  .location-text {
    max-width: 70px;
  }

  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .categories .col-md-3,
  .categories .images {
    padding: 4px !important;
  }

  .category-images,
  .category-images-video,
  .category-images-pro {
    min-height: 120px;
  }

  .category-images img,
  .category-images-pro img,
  .category-images-video iframe {
    height: 120px;
  }

  .product-card {
    padding: 10px !important;
    min-height: 260px;
  }

  .product-card img {
    height: 120px !important;
  }

  .product-card h3 {
    font-size: 13px !important;
    min-height: 36px !important;
  }

  .product-card .price-info span {
    font-size: 14px !important;
  }

  .add-cart-button {
    font-size: 10px !important;
    padding: 6px 10px !important;
  }

  .mobile-nav-item {
    font-size: 9px;
  }

  .mobile-nav-item .nav-label {
    font-size: 10px;
  }
}

/* ===== iPhone SE and smaller (up to 375px) ===== */
@media only screen and (max-width: 375px) {
  .mobile-logo img {
    height: 30px;
  }

  .location-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .location-text {
    max-width: 60px;
  }

  .product-card {
    min-height: 240px;
  }

  .product-card img {
    height: 110px !important;
  }

  .product-card h3 {
    font-size: 12px !important;
    min-height: 34px !important;
  }

  .sellars-heading span {
    font-size: 16px !important;
  }
}

/* ===== Fix for iOS Safari ===== */
@supports (-webkit-touch-callout: none) {
  .mobile-bottom-nav {
    padding-bottom: max(env(safe-area-inset-bottom), 10px);
  }

  main {
    padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }
}

/* ===== Landscape Mode Fixes ===== */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  .mobile-header {
    height: 50px;
  }

  .mobile-bottom-nav {
    height: 50px;
  }

  main {
    padding-top: 50px !important;
    padding-bottom: 60px !important;
  }

  .mobile-logo img {
    height: 28px;
  }
}