/* ==========================================================================
   Oiyaa Loyalty - Responsive Styles
   Mobile-first responsive design for all breakpoints
   ========================================================================== */

/* ---------- Desktop & Tablet (max-width: 1200px) ---------- */
@media (max-width: 1200px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .card-media {
    height: 160px;
  }
}

/* ---------- Tablet & Mobile (max-width: 980px) ---------- */
@media (max-width: 980px) {
  /* Hero Section */
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  
  .phone-wrap {
    margin-top: 10px;
  }
  
  .float-tag {
    display: none;
  }
  
  /* Search Results */
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Mobile Navigation (max-width: 900px) ---------- */
@media (max-width: 900px) {
  /* Navigation */
  nav.primary {
    display: none;
    position: fixed;
    top: 91px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(16, 63, 105, 0.1);
    padding: 20px 0 24px;
    z-index: 60;
  }
  
  nav.primary.active {
    display: block;
  }
  
  nav.primary ul {
    flex-direction: column;
    gap: 0;
  }
  
  nav.primary li {
    border-bottom: 1px solid var(--line);
  }
  
  nav.primary li:last-child {
    border-bottom: none;
  }
  
  nav.primary a {
    display: block;
    padding: 16px 24px;
    font-size: 15px;
  }
  
  .nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px 0;
    border-top: 1px solid var(--line);
    margin-top: 10px;
  }
  
  .nav-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }
  
  .nav-cta {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .brand img {
    height: 60px;
  }
}

/* ---------- Tablet Layouts (max-width: 820px) ---------- */
@media (max-width: 820px) {
  /* Bento Grid */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  
  .bento-tile.big {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 180px;
  }
  
  .bento-tile {
    min-height: 140px;
  }
  
  /* Footer */
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 28px;
  }
}

/* ---------- App Section (max-width: 780px) ---------- */
@media (max-width: 780px) {
  .app-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .app-card p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .store-row {
    justify-content: center;
  }
  
  .app-card::after {
    display: none;
  }
}

/* ---------- Timeline (max-width: 760px) ---------- */
@media (max-width: 760px) {
  .tl-row {
    flex-direction: column;
    gap: 36px;
  }
  
  .tl-item::before {
    display: none;
  }
}

/* ---------- Mobile Phone Mockup (max-width: 780px) ---------- */
@media (max-width: 780px) {
  .phone {
    width: 240px;
    padding: 12px;
  }
  
  .phone-screen {
    height: 420px;
    padding: 14px;
    gap: 10px;
  }
  
  .phone-screen .ps-search {
    padding: 8px 12px;
    font-size: 11px;
  }
  
  .deal-card {
    padding: 10px;
    gap: 8px;
    border-radius: 12px;
  }
  
  .deal-card .avatar {
    width: 36px;
    height: 36px;
  }
  
  .deal-card .meta strong {
    font-size: 11.5px;
  }
  
  .deal-card .meta span {
    font-size: 10px;
  }
  
  .deal-card .pct {
    font-size: 11px;
  }
}

/* ---------- Mobile Search (max-width: 640px) ---------- */
@media (max-width: 640px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .search-row .wrap {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-field {
    max-width: 100%;
  }
  
  .results-count {
    order: 2;
    text-align: center;
  }
  
  /* Phone Mockup Mobile Optimization */
  .phone {
    width: 220px;
    padding: 10px;
  }
  
  .phone-screen {
    height: 390px;
    padding: 12px;
    gap: 9px;
    border-radius: 20px;
  }
  
  .phone-screen .ps-search {
    padding: 7px 11px;
    font-size: 10px;
    border-radius: 16px;
  }
  
  .deal-card {
    padding: 9px;
    gap: 7px;
    border-radius: 10px;
    min-height: auto;
  }
  
  .deal-card .avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    min-width: 32px;
  }
  
  .deal-card .meta {
    flex: 1;
    min-width: 0;
  }
  
  .deal-card .meta strong {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .deal-card .meta span {
    font-size: 9.5px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .deal-card .pct {
    font-size: 10px;
    min-width: auto;
    flex: 0 0 auto;
  }
  
  .chips-container {
    flex-wrap: wrap;
  }
  
  .card-media {
    height: 200px;
  }
}

/* ---------- Small Mobile (max-width: 600px) ---------- */
@media (max-width: 600px) {
  /* Header */
  .brand img {
    height: 50px;
  }
  
  /* Hero Section */
  .hero {
    padding: 40px 0 60px;
  }
  
  .hero .eyebrow {
    font-size: 11px;
    padding: 6px 12px;
  }
  
  .hero h1 {
    margin-top: 16px;
  }
  
  .hero p.sub {
    margin-top: 12px;
  }
  
  .search-pill {
    margin-top: 20px;
    padding: 5px 5px 5px 16px;
  }
  
  .search-pill input {
    font-size: 14px;
    padding: 10px 0;
  }
  
  .search-pill button {
    font-size: 13px;
    padding: 10px 16px;
  }
  
  .hero-mini-stats {
    gap: 16px;
    margin-top: 20px;
  }
  
  .hero-mini-stats div {
    font-size: 12px;
  }
  
  .hero-mini-stats strong {
    font-size: 18px;
  }
  
  .phone {
    width: 220px;
    padding: 10px;
  }
  
  .phone-screen {
    padding: 12px;
    height: 390px;
    gap: 9px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .phone-screen .ps-search {
    padding: 7px 11px;
    font-size: 10px;
    border-radius: 16px;
  }
  
  .deal-card {
    padding: 9px;
    gap: 7px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  
  .deal-card .avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex: 0 0 32px;
  }
  
  .deal-card .meta strong {
    font-size: 11px;
  }
  
  .deal-card .meta span {
    font-size: 9.5px;
  }
  
  .deal-card .pct {
    font-size: 10px;
  }
  
  .blob-1 {
    width: 360px;
    height: 360px;
    top: -180px;
    right: -120px;
  }
  
  .blob-2 {
    width: 140px;
    height: 140px;
  }
  
  /* Bento Section */
  .bento {
    padding: 40px 0 60px;
  }
  
  .section-head {
    margin-bottom: 30px;
  }
  
  .section-head p {
    font-size: 14px;
  }
  
  .bento-grid {
    gap: 12px;
  }
  
  .bento-tile {
    padding: 18px;
    min-height: 120px;
  }
  
  .bento-tile.big {
    min-height: 160px;
  }
  
  .bento-tile h3 {
    font-size: 15px;
  }
  
  .bento-tile p {
    font-size: 11.5px;
  }
  
  /* Timeline */
  .timeline {
    padding: 60px 0;
  }
  
  .tl-row {
    gap: 28px;
  }
  
  .tl-dot {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .tl-item h3 {
    font-size: 15px;
  }
  
  .tl-item p {
    font-size: 13px;
    margin-top: 6px;
  }
  
  /* App Section */
  .app-section {
    padding: 60px 0;
  }
  
  .app-card {
    padding: 36px 24px;
    border-radius: 20px;
  }
  
  .app-card p {
    font-size: 14px;
    margin-top: 10px;
  }
  
  .store-row {
    margin-top: 20px;
    gap: 8px;
  }
  
  .store-row img {
    height: 38px;
  }
  
  .qr-block {
    padding: 16px;
  }
  
  .qr-grid {
    width: 120px;
    height: 120px;
  }
  
  /* Footer */
  footer {
    padding: 40px 0 24px;
    font-size: 13px;
  }
  
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .foot-brand img {
    height: 60px;
    margin-bottom: 12px;
  }
  
  .foot-brand p {
    max-width: 100%;
  }
  
  footer h4 {
    font-size: 11px;
    margin-bottom: 12px;
  }
  
  footer ul {
    gap: 8px;
  }
  
  .social-row {
    margin-top: 12px;
  }
  
  .social-row a {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .newsletter-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .newsletter-row input {
    min-width: 100%;
    font-size: 13px !important;
    padding: 11px 14px !important;
  }
  
  .newsletter-row button {
    width: 100%;
    font-size: 13px !important;
    padding: 11px 18px !important;
  }
  
  .foot-bottom {
    margin-top: 30px;
    padding-top: 16px;
    font-size: 11.5px;
    justify-content: center;
    text-align: center;
  }
  
  .foot-bottom .links {
    justify-content: center;
    gap: 12px;
  }
}

/* ---------- Extra Small Mobile (max-width: 480px) ---------- */
@media (max-width: 480px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  
  .bento-tile,
  .bento-tile.big {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 140px;
  }
  
  /* Phone Mockup Extra Small Screens */
  .phone {
    width: 200px;
    padding: 8px;
  }
  
  .phone-screen {
    padding: 10px;
    height: 340px;
    gap: 8px;
    border-radius: 18px;
  }
  
  .phone-screen .ps-search {
    padding: 6px 10px;
    font-size: 9px;
  }
  
  .deal-card {
    padding: 8px;
    gap: 6px;
    border-radius: 8px;
  }
  
  .deal-card .avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex: 0 0 28px;
  }
  
  .deal-card .meta strong {
    font-size: 10px;
  }
  
  .deal-card .meta span {
    font-size: 8.5px;
  }
  
  .deal-card .pct {
    font-size: 9px;
  }
  
  .container,
  .wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ---------- Print Styles ---------- */
@media print {
  header,
  footer,
  .menu-toggle,
  .nav-cta,
  .btn {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}

/* ---------- High Resolution Displays ---------- */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ---------- Landscape Orientation ---------- */
@media (max-width: 900px) and (orientation: landscape) {
  .hero {
    padding: 40px 0 50px;
  }
  
  .phone {
    display: none;
  }
  
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* ========== Appointment Page Responsive Styles ========== */

/* Appointment Page on Desktop (max-width: 1200px) */
@media (max-width: 1200px) {
  .appointment-page {
    padding: 20px 0 60px;
  }
  
  .appointment-card-inner {
    padding: 28px;
  }
}

/* Appointment Page on Tablet (max-width: 980px) */
@media (max-width: 980px) {
  .appointment-page {
    padding: 16px 0 50px;
  }
  
  .appointment-card-inner {
    padding: 24px;
  }
  
  .appointment-card h3 {
    font-size: 26px;
  }
  
  .appointment-form .row {
    margin-right: -6px;
    margin-left: -6px;
  }
  
  .appointment-form .col-lg-6 {
    padding-right: 6px;
    padding-left: 6px;
  }
}

/* Appointment Page on Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .appointment-page {
    padding: 12px 0 40px;
  }
  
  .order-online-layout {
    flex-direction: column;
  }
  
  .appointment-main {
    order: 1;
  }
  
  .order-side-column {
    order: 2;
  }
  
  .appointment-card-inner {
    padding: 20px;
  }
  
  .appointment-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
  }
  
  .appointment-card-subtitle {
    font-size: 13px;
    margin-bottom: 18px;
  }
  
  .appointment-form .form-label {
    font-size: 12.5px;
    margin-bottom: 6px;
  }
  
  .appointment-form .form-control,
  .appointment-form .form-select {
    font-size: 13px;
    min-height: 45px;
    padding: 10px 12px;
  }
  
  .appointment-form .row.g-3 {
    gap: 1rem !important;
  }
  
  .appointment-form textarea.form-control {
    min-height: 100px;
    font-size: 13px;
  }
  
  #selected_service {
    gap: 6px;
    margin-top: 8px;
  }
  
  .selected-service-tag {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .selected-service-tag .service-duration {
    font-size: 11px;
  }
  
  .selected-service-tag .remove-service {
    width: 16px;
    height: 16px;
  }
  
  .selected-service-tag .remove-service i {
    font-size: 12px;
  }
  
  .appointment-submit-wrap {
    margin-top: 20px;
  }
  
  .appointment-submit,
  .btn-book {
    padding: 12px 24px;
    min-width: 200px;
    font-size: 12px;
  }
  
  .service-already-added {
    font-size: 12px;
    padding: 8px 10px;
  }
}

/* Appointment Page on Small Mobile (max-width: 640px) */
@media (max-width: 640px) {
  .appointment-page {
    padding: 8px 0 32px;
  }
  
  .appointment-card {
    border-radius: 14px;
  }
  
  .appointment-card-inner {
    padding: 16px;
  }
  
  .appointment-card h3 {
    font-size: 20px;
    margin-bottom: 6px;
  }
  
  .appointment-card-subtitle {
    font-size: 12px;
    margin-bottom: 16px;
  }
  
  .appointment-form .form-label {
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 600;
  }
  
  .appointment-form .form-control,
  .appointment-form .form-select {
    font-size: 13px;
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 10px;
  }
  
  .appointment-form .col-lg-6,
  .appointment-form .col-md-6 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .appointment-form .row.g-3 {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
  
  .appointment-form .row.g-3 > * {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }
  
  .appointment-form textarea.form-control {
    min-height: 90px;
    font-size: 13px;
  }
  
  #selected_service {
    gap: 5px;
    margin-top: 6px;
  }
  
  .selected-service-tag {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 6px;
  }
  
  .selected-service-tag .service-name {
    font-weight: 600;
  }
  
  .selected-service-tag .service-duration {
    font-size: 10px;
  }
  
  .selected-service-tag .remove-service {
    width: 15px;
    height: 15px;
    min-width: 15px;
  }
  
  .selected-service-tag .remove-service i {
    font-size: 11px;
  }
  
  .appointment-submit-wrap {
    margin-top: 16px;
  }
  
  .appointment-submit,
  .btn-book {
    width: 100%;
    padding: 11px 20px;
    min-width: auto;
    font-size: 11px;
  }
  
  .service-already-added {
    font-size: 11px;
    padding: 7px 9px;
    margin-top: 8px;
  }
  
  .benefit-item {
    font-size: 12px;
    gap: 8px;
    padding: 8px 10px;
  }
  
  .benefit-item i {
    font-size: 14px;
  }
  
  .deposit-amount {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }
  
  #service_summary {
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* Appointment Page on Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .appointment-card-inner {
    padding: 14px;
  }
  
  .appointment-card h3 {
    font-size: 18px;
  }
  
  .appointment-card-subtitle {
    font-size: 11px;
  }
  
  .appointment-form .form-label {
    font-size: 11px;
  }
  
  .appointment-form .form-control,
  .appointment-form .form-select {
    font-size: 12px;
    min-height: 40px;
    padding: 8px 10px;
  }
  
  .appointment-submit,
  .btn-book {
    padding: 10px 18px;
    font-size: 10px;
  }
}

/* ---------- Dark Mode Support (Optional) ---------- */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode */
  /*
  :root {
    --white: #0A0A0A;
    --ink: #FFFFFF;
    --grey: #B0B0B0;
    --line: #2A2A2A;
    --sky-soft: #1A2530;
  }
  
  body {
    background: var(--white);
    color: var(--ink);
  }
  
  header {
    background: rgba(10, 10, 10, 0.94);
  }
  */
}
