/*
 * =============================================================================
 * POINT CARPET — Media Queries & Responsive Styles
 * =============================================================================
 * Rules grouped by breakpoint. Use Ctrl+F: "max-width: 992px", "768px", or "576px".
 *
 * BREAKPOINTS:
 *   • max-width: 992px  — Tablet / small laptop
 *   • max-width: 768px  — Tablet portrait / large mobile
 *   • max-width: 576px  — Small mobile
 * =============================================================================
 */

/* ========== 1. VARIABLES START ========== */
:root {
  --main-color: #050505;
  --second-color: #800000;
  --third-color: #f5f0eb;
  --white-color: #ffffff;
  --black-color: #000000;
  --placeholder-color: #a1a1a1;

  /* Grays — text, borders, backgrounds */
  --gray-900: #222222;
  --gray-800: #212121;
  --gray-750: #444444;
  --gray-700: #555555;
  --gray-600: #666666;
  --gray-500: #999999;
  --gray-400: #888888;
  --gray-300: #6c757d;
  --gray-200: #e0e0e0;
  --gray-150: #e8e8e8;
  --gray-100: #f5f5f5;
  --gray-50: #fafafa;
  --gray-25: #f8f9fa;
  --gray-border: #e9ecef;
  --gray-250: #dddddd;
  --gray-surface: #787878;

  /* Semantic — success, danger, warning */
  --success-color: #198754;
  --success-light: #28a745;
  --success-teal: #20c997;
  --danger-color: #dc3545;
  --danger-dark: #b02a37;
  --danger-light: #ff6b6b;
  --warning-color: #ffc107;

  /* Off-white (hero/subtle text) */
  --off-white: #f1f1f1;

  /* Border radius — values used across the file */
  --radius-0: 0;
  --radius-2: 2px;
  --radius-4: 4px;
  --radius-5: 5px;
  --radius-6: 6px;
  --radius-8: 8px;
  --radius-10: 10px;
  --radius-12: 12px;
  --radius-14: 14px;
  --radius-16: 16px;
  --radius-18: 18px;
  --radius-20: 20px;
  --radius-24: 24px;
  --radius-pill: 50px;
  --radius-pill-lg: 999px;
  --radius-full: 50%;

  /* Header — nav bar border color */
  --header-nav-border: rgba(255, 255, 255, 0.1);
}
/* ========== 1. VARIABLES END ========== */

/* ========== 2. max-width: 992px — all 992px rules START ========== */
@media (max-width: 992px) {
  .logo-and-menu {
    width: 100%;
  }
  /* --- Header & Bottom Nav --- */
  .bottom-nav-search {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }

  /* --- Special Offers --- */
  .special-offer-title {
    font-size: 28px;
  }

  .special-offer-desc {
    font-size: 14px;
  }

  .special-offer-countdown {
    gap: 12px;
  }

  .countdown-item {
    padding: 12px 16px;
    min-width: 70px;
  }

  .countdown-number {
    font-size: 24px;
  }

  .countdown-label {
    font-size: 11px;
  }

  .special-offers-prev,
  .special-offers-next {
    width: 40px;
    height: 40px;

    i {
      font-size: 14px;
    }
  }
}
/* ========== 2. max-width: 992px END ========== */

/* ========== 3. max-width: 768px — all 768px rules START ========== */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
  }
  /* --- Header / Page Hero --- */
  .header-logo {
    img {
      max-height: 40px;
    }
  }

  .page-hero {
    min-height: 220px;
    padding-bottom: 24px;

    .page-title {
      font-size: 24px !important;
    }
  }

  /* --- Auth --- */
  .auth-page-wrap {
    flex-direction: column;
    min-height: auto;
  }

  .auth-page-image {
    min-height: 220px;
    width: 100% !important;

    img {
      min-height: 220px;
    }
  }

  .auth-form-box {
    padding: 30px 20px !important;

    .auth-form-title {
      font-size: 22px;
    }
  }

  /* --- Account Section --- */
  .account-section {
    .card-box {
      padding: 1.5rem 1.25rem;
    }

    .account-nav .list-group-item {
      padding: 14px 16px;

      i {
        width: 32px;
        height: 32px;
        font-size: 13px;
      }
    }
  }

  /* --- Product Details --- */
  .product-details-section {
    padding: 1.25rem 0 2rem;
  }

  .product-info-wrap {
    padding-left: 0;
    padding-right: 0;
  }

  [dir="rtl"] .product-info-wrap {
    padding-right: 0;
    padding-left: 0;
  }

  .product-gallery-wrap {
    position: static;
  }

  .product-title {
    font-size: 1.25rem;
  }

  .product-tabs-block .product-tabs .nav-link {
    padding: 12px 16px;
    font-size: 0.875rem;
  }

  .product-tab-content {
    padding: 1.25rem 1rem;
  }

  .product-details-buy {
    flex-direction: column;
    align-items: stretch;

    .btn-product-icon {
      flex: 1;
    }
  }

  .product-details-extra {
    flex-direction: column;
    gap: 12px;
  }

  .product-details-trust {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-related-title {
    font-size: 1.1rem;
  }

  /* --- Account Edit / Address --- */
  .account-edit-section .card-box {
    .account-form-actions {
      flex-direction: column;
      align-items: stretch;

      .btn {
        margin: 0 !important;
        text-align: center;
      }
    }
  }

  .account-address-section {
    .address-card-header {
      padding: 1rem 1.25rem 0;
    }

    .address-card-icon {
      width: 42px;
      height: 42px;
      font-size: 1rem;
    }

    .address-card-body {
      padding: 0.85rem 1.25rem 1rem;
    }

    .address-card-actions {
      padding: 0.85rem 1.25rem 1rem;
    }

    .btn-add-address {
      width: 100%;
      justify-content: center;
      padding: 12px 20px;
    }
  }

  /* --- Auth modal (Login / Register / Forgot) --- */
  #authModal {
    .modal-dialog {
      margin: 0.5rem;
      max-width: calc(100% - 1rem);
    }

    .modal-header,
    .modal-body {
      padding-left: 1.25rem;
      padding-right: 1.25rem;
    }

    .modal-footer-actions {
      flex-direction: column;

      .btn {
        width: 100%;
        justify-content: center;
      }
    }
  }

  /* --- Point Carpet modals (e.g. account address edit/remove) --- */
  .point-carpet-modal {
    .modal-dialog {
      margin: 0.5rem;
      max-width: calc(100% - 1rem);
    }

    .modal-header,
    .modal-body {
      padding-left: 1.25rem;
      padding-right: 1.25rem;
    }

    .modal-footer-actions {
      flex-direction: column;

      .btn {
        width: 100%;
        justify-content: center;
      }
    }
  }

  /* --- Account Orders --- */
  .account-orders-section {
    .orders-table-wrap {
      border-radius: 12px;
    }

    .orders-table {
      thead th,
      tbody td {
        padding: 12px 14px;
        font-size: 14px;
      }
    }

    .orders-table-id {
      font-size: 14px;
    }

    .btn-orders-view {
      padding: 6px 14px;
      font-size: 12px;
    }
  }

  /* --- Account Order Details --- */
  .account-order-details-section {
    .order-details-tabs .nav-link {
      padding: 10px 14px;
      font-size: 13px;
    }

    .order-item {
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .order-item-img {
      width: 56px;
      height: 56px;
    }

    .order-item-price {
      width: 100%;
      text-align: left;
      padding-left: calc(56px + 1rem);
    }

    .order-details-meta {
      flex-direction: column;
      gap: 0.5rem;
      font-size: 13px;
    }

    .order-status-timeline {
      flex-direction: column;
      gap: 1rem;
      padding: 1rem 0;

      &::before {
        top: 0;
        bottom: 0;
        left: 6px;
        right: auto;
        width: 2px;
        height: 100%;
        transform: none;
      }
    }

    .order-timeline-step {
      flex-direction: row;
      align-items: center;
      gap: 12px;
      max-width: none;
    }

    .order-timeline-dot {
      flex-shrink: 0;
    }

    .order-timeline-label {
      flex: 1;
    }

    .order-timeline-date {
      font-size: 12px;
    }

    .order-hero-main {
      flex-direction: column;
      align-items: flex-start;
    }

    .order-hero-card {
      padding: 1.25rem;
    }

    .order-hero-icon {
      width: 44px;
      height: 44px;
      font-size: 1.2rem;
    }

    .order-tabs-wrap {
      width: 100%;
    }

    .order-details-tabs {
      flex-wrap: nowrap;

      .nav-link {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 8px 12px;
        font-size: 13px;
      }
    }

    .order-addresses-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    .order-item {
      margin: 0 0.25rem;
      padding: 0.85rem;
    }

    .order-item-img {
      width: 64px;
      height: 64px;
    }

    .order-summary-card .order-summary-row.order-summary-total {
      margin: 1rem -1.25rem -1.25rem -1.25rem;
      padding: 1rem 1.25rem;
    }
  }

  /* --- Featured Products --- */
  .featured-products-title {
    font-size: 24px;
  }

  .product-card-title {
    font-size: 14px;
  }

  .price-current {
    font-size: 18px;
  }

  .product-card-type {
    gap: 6px;
  }

  .product-type-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .product-size-badge {
    font-size: 11px;
  }

  .featured-products-tabs .nav-link {
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 50px;

    i {
      font-size: 12px;
      margin-right: 4px !important;
    }
  }

  /* --- Special Offers --- */
  .special-offer-banner {
    border-radius: 0;
    height: 100vh !important;
  }

  .special-offer-content {
    padding: 24px !important;
    left: 0 !important;
    justify-content: center !important;
    align-items: center;
    text-align: center !important;
  }

  .special-offer-title {
    font-size: 22px;
  }

  .special-offer-desc {
    font-size: 13px;
  }

  .special-offer-countdown {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .countdown-item {
    padding: 10px 12px;
    min-width: 60px;
    flex: 1;
    min-width: calc(50% - 4px);
    max-width: calc(50% - 4px);
  }

  .countdown-number {
    font-size: 20px;
  }

  .countdown-label {
    font-size: 10px;
  }

  .special-offer-image img {
    height: 100vh !important;
  }

  .special-offers-pagination {
    bottom: 10px !important;
  }

  /* --- Checkout --- */
  .checkout-section-title {
    font-size: 26px;
  }

  /* --- Why Choose Us --- */
  .why-choose-us-title {
    font-size: 24px;
  }

  .feature-title {
    font-size: 18px !important;
  }

  .feature-desc {
    font-size: 16px !important;
  }

  .feature-icon i {
    font-size: 16px !important;
  }

  .image-split {
    display: flex;
    height: 100%;
    width: 100%;
    gap: 8px;
  }

  .box {
    flex: 1;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.6s ease-out;
    height: 300px;
  }

  .box1 {
    background-position: 0 0;

    &[data-aos].aos-animate {
      transform: translateY(-10px) !important;
    }
  }

  .box2 {
    background-position: -200px 0;

    &[data-aos].aos-animate {
      transform: translateY(10px) !important;
    }
  }

  .box3 {
    background-position: -500px 0 !important;

    &[data-aos].aos-animate {
      transform: translateY(-10px) !important;
    }
  }

  .box4 {
    background-position: -600px 0;

    &[data-aos].aos-animate {
      transform: translateY(10px) !important;
    }
  }

  /* --- Blog --- */
  .blog-section-title {
    font-size: 24px;
  }

  .blog-card-title {
    font-size: 18px;
  }

  .blog-card-excerpt {
    font-size: 14px;
  }

  .blog-date-day {
    font-size: 20px;
  }

  .blog-date-month {
    font-size: 11px;
  }
}
/* ========== 3. max-width: 768px END ========== */

/* ========== 4. max-width: 576px — all 576px rules START ========== */
@media (max-width: 576px) {
  .featured-products-tabs-wrap {
    width: 100% !important;
    justify-content: start !important;
  }

  .featured-products-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;

    .nav-link {
      font-size: 12px;
      padding: 8px 10px;
      text-align: center;
      border-radius: 50px;

      i {
        display: block;
        margin: 0 0 2px 0 !important;
        font-size: 14px;
      }
    }
  }
}
/* ========== 4. max-width: 576px END ========== */
