/* =====================================================
   MAIN CONTENT ALLOWANCE (all devices, pantay top & bottom)
===================================================== */
main.content-wrapper {
  /* remove margin-top and margin-bottom */
  padding-top: 50px;       /* breathing space */
  padding-bottom: 50px;    /* pantay sa taas at baba */
  box-sizing: border-box;
}





  /* =====================================================
     GLOBAL STYLES (applies to all)
  ===================================================== */
  body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f7f8fc;
    color: #333;
  }

  /* ===== SHARED WRAPPER ===== */
  .content-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
  }

  /* ===== HEADER WRAP ===== */
  .header-wrap { text-align: left; }
  .page-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #111;
  }
  .banner-img { margin: 0 0 20px 0; }
  .banner-img img {
    max-width: 900px;
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    display: block;
  }

  /* ===== DESCRIPTION + LINKS ===== */
  .info-section {
    margin: 0 0 30px 0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
  }
  .info-section p { margin-bottom: 20px; color: #444; }
  .info-section h3 { margin-bottom: 10px; font-size: 1.1rem; color: #444; }
  .info-section a {
    display: block;
    margin: 6px 0;
    color: #0066cc;
    text-decoration: none;
  }
  .info-section a:hover { text-decoration: underline; }

  /* ===== FILTER / SORT BAR ===== */
  .filter-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    background: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
  }
  .filter-options, .sort-options { display: flex; gap: 15px; }
  select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

  /* ===== MOBILE FILTER PANEL ===== */
  .filter-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    transition: 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
  }
  .filter-panel.active { right: 0; }

  .filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
  }
  .filter-header button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
  }

  .filter-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
  }
  .filter-content h4 {
    margin: 15px 0 5px;
    font-size: 1rem;
    font-weight: bold;
  }
  .filter-content select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
  }

  .filter-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-top: 1px solid #ddd;
  }
  .filter-footer .remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
  }
  .filter-footer .apply {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
  }

  /* ===== PRODUCT GRID ===== */
  .product-grid {
    display: grid;
    gap: 20px;
    padding: 20px 0;
  }

  /* ===== PRODUCT BUTTON ===== */
  .add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease-in-out;
    color: #333;
    font-weight: bold;
  }
  .add-to-cart-btn:hover {
    background: #f2f2f2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }

  /* desktop-only / mobile-only toggle */
  .desktop-only { display: flex; }
  .mobile-only { display: none; }



 






























 /* =====================================================
     DESKTOP (≥769px)
  ===================================================== */
  @media screen and (min-width: 769px) {
    .product-grid {
      grid-template-columns: repeat(4, 1fr);
      gap: 25px;
      padding: 25px 0;
    }

    .product-card {
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 12px;
      padding: 18px;
      text-align: center;
      transition: 0.3s;
      min-height: 520px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }
    .product-card:hover {
      box-shadow: 0 6px 15px rgba(0,0,0,0.15);
      transform: translateY(-3px);
    }
    .product-card img {
      width: 100%;
      height: 320px;
      object-fit: contain;
      border-radius: 8px;
      margin-bottom: 15px;
    }
    .product-info {
      flex-grow: 1;
      text-align: left;
      margin-bottom: 15px;
    }
    .product-name {
      font-size: 1rem;
      font-weight: bold;
      margin: 0 0 8px;
      color: #111;
      line-height: 1.4;
      min-height: 44px;
    }
    .product-price {
      font-size: 1.1rem;
      font-weight: bold;
      color: #0066cc;
      margin-bottom: 12px;
    }
    .btn {
      margin-top: auto;
      font-size: 1rem;
      padding: 12px;
      border-radius: 8px;
    }
  }



  















































/* =====================================================
     MOBILE (≤768px)
  ===================================================== */
  @media screen and (max-width: 768px) {
    /* ===== Toggle visibility ===== */
    .desktop-only { display: none; }
    .mobile-only {
      display: block;
      width: 100%;
      padding: 12px;
      margin: 10px 0;
      background: #0066cc;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 1rem;
      font-weight: bold;
      cursor: pointer;
    }

    /* ===== Banner image fix ===== */
    .banner-img img {
      width: 100%;
      height: auto;
      max-height: 200px;
      object-fit: contain;
      border-radius: 12px;
      display: block;
      margin: 0 auto;
    }

    /* ===== Page title ===== */
    .page-title {
      font-size: 1.5rem;
      margin-bottom: 8px;
    }

    /* ===== Product grid ===== */
    .product-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
      padding: 15px 0;
    }

    /* ===== Product card ===== */
    .product-card {
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 10px;
      padding: 12px;
      text-align: center;
      transition: 0.3s;
      min-height: 360px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .product-card:hover {
      box-shadow: 0 6px 15px rgba(0,0,0,0.1);
      transform: translateY(-3px);
    }
    .product-card img {
      width: 100%;
      height: 180px;
      object-fit: contain;
      border-radius: 8px;
      margin-bottom: 10px;
    }

    /* ===== Product info ===== */
    .product-info {
      margin-top: auto;
      margin-bottom: 10px;
      text-align: left;
      width: 100%;
    }
    .product-name {
      font-size: 0.95rem;
      font-weight: bold;
      margin: 0 0 4px;
      color: #111;
    }
    .product-price {
      font-size: 1rem;
      font-weight: bold;
      color: #0066cc;
      margin-bottom: 10px;
    }
  }





  /* ======================================================
     LOADING SPINNER INSIDE ADD TO CART BUTTON
  ====================================================== */
  .add-to-cart-btn.loading {
    position: relative;
    color: transparent;     /* hide text */
    pointer-events: none;   /* disable click habang loading */
  }

  .add-to-cart-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }








  /* Modal Styles */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }

  .modal-content {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
  }

  #closeModal {
    margin-top: 10px;
    padding: 5px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
  }