/**
 * Responsive styles for OCS OpenCart Theme v3.0
 */

/* ============================================================
   1. LAPTOP & SMALL DESKTOP (<= 1200px)
   ============================================================ */
@media (max-width: 1240px) {
  .ocs-hero-title {
    font-size: 46px;
  }
  .ocs-hero-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn-quote-header {
    display: none !important;
  }
  .ocs-desktop-nav,
  .ocs-nav-wrapper {
    margin-left: 12px !important;
  }
  .ocs-nav-list,
  .ocs-nav {
    gap: 16px !important;
  }
  .ocs-nav-link {
    font-size: 13.5px !important;
  }
  .ocs-logo {
    margin-right: 14px;
  }
  .ocs-header-actions {
    gap: 12px !important;
  }
  .ocs-split-left {
    padding: 40px;
    gap: 30px;
  }
  .ocs-split-right {
    padding: 40px;
  }
  .ocs-mega-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ============================================================
   2. TABLET & MOBILE (<= 1040px)
   ============================================================ */
@media (max-width: 1040px) {
  /* Header & Navigation */
  .ocs-header-inner {
    height: 64px !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .ocs-logo img {
    max-height: 32px !important;
    max-width: 170px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .ocs-brand-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .ocs-brand-dev,
  .ocs-brand-name {
    font-size: 22px !important;
  }

  .ocs-desktop-nav,
  .ocs-nav-wrapper {
    display: none !important;
  }

  .ocs-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-left: auto !important;
  }

  .ocs-header-actions .btn-quote-header,
  .ocs-header-actions .ocs-header-lang-curr {
    display: none !important;
  }

  .ocs-cart-widget {
    display: block !important;
  }

  .ocs-cart-widget #cart > button,
  .ocs-cart-widget #cart > .btn,
  .ocs-cart-widget #cart > .ocs-cart-btn {
    padding: 7px 14px !important;
    font-size: 12px !important;
    border-radius: 25px !important;
  }

  .ocs-cart-widget #cart-total {
    font-size: 12px !important;
  }

  /* Mobile Cart Dropdown Modal/Drawer Positioning */
  .ocs-header #cart .dropdown-menu,
  .ocs-header #cart .ocs-cart-dropdown {
    position: fixed !important;
    top: 65px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85) !important;
    z-index: 9999 !important;
  }

  .ocs-mobile-bar-right,
  .ocs-cart-widget-mobile {
    display: none !important;
  }

  .ocs-mobile-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
  }

  .ocs-mobile-toggle:active {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(0.95) !important;
  }

  /* Mobile Navigation Drawer Backdrop */
  .ocs-mobile-backdrop {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(11, 14, 36, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .ocs-mobile-backdrop.open {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Mobile Slide-out Drawer */
  .ocs-mobile-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 320px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    background: #FFFFFF !important;
    z-index: 9999 !important;
    transform: translateX(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
  }

  .ocs-mobile-drawer.open {
    transform: translateX(0) !important;
  }

  /* Drawer Top Bar */
  .ocs-drawer-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    background: #0B0E24 !important;
    color: #FFFFFF !important;
    flex-shrink: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .ocs-drawer-lang-curr {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .ocs-drawer-lang-curr .btn-link {
    color: #FFFFFF !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
  }

  .ocs-drawer-close {
    background: transparent !important;
    border: none !important;
    color: #FFFFFF !important;
    font-size: 20px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    transition: background 0.2s ease !important;
  }

  .ocs-drawer-close:hover {
    background: rgba(255, 255, 255, 0.15) !important;
  }

  /* Drawer Search */
  .ocs-drawer-search {
    padding: 12px 18px !important;
    background: #F8FAFC !important;
    border-bottom: 1px solid #E2E8F0 !important;
    flex-shrink: 0 !important;
  }

  .ocs-drawer-search-box {
    display: flex !important;
    align-items: center !important;
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 24px !important;
    padding: 6px 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  .ocs-drawer-search-box input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    width: 100% !important;
    font-size: 13px !important;
    color: #1E293B !important;
    font-family: inherit !important;
  }

  .ocs-drawer-search-box button {
    background: none !important;
    border: none !important;
    color: #64748B !important;
    font-size: 14px !important;
    cursor: pointer !important;
    padding: 0 0 0 6px !important;
  }

  /* Drawer Nav Body & Menu Items */
  .ocs-drawer-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 6px 0 30px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .ocs-drawer-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ocs-drawer-heading {
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    color: #94A3B8 !important;
    padding: 18px 20px 8px !important;
    list-style: none !important;
  }

  .ocs-drawer-item {
    border-bottom: 1px solid #F1F5F9 !important;
    list-style: none !important;
  }

  .ocs-drawer-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 20px !important;
    transition: background 0.15s ease !important;
  }

  .ocs-drawer-row:hover {
    background: #F8FAFC !important;
  }

  .ocs-drawer-link {
    color: #0F172A !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 !important;
  }

  .ocs-drawer-link:hover,
  .ocs-drawer-link:focus {
    color: #8C52FF !important;
    text-decoration: none !important;
  }

  .ocs-accordion-toggle {
    background: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 6px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748B !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
  }

  .ocs-drawer-item.active .ocs-accordion-toggle {
    background: #8C52FF !important;
    border-color: #8C52FF !important;
    color: #FFFFFF !important;
  }

  .ocs-drawer-submenu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #F8FAFC !important;
    display: none !important;
    border-top: 1px solid #EEF2F6 !important;
  }

  .ocs-drawer-item.active .ocs-drawer-submenu {
    display: block !important;
  }

  .ocs-drawer-sublink {
    padding: 10px 20px 10px 36px !important;
    color: #475569 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    border-bottom: 1px solid #EEF2F6 !important;
    transition: all 0.15s ease !important;
  }

  .ocs-drawer-sublink:hover {
    color: #8C52FF !important;
    background: #EFF2F6 !important;
    text-decoration: none !important;
    padding-left: 40px !important;
  }

  /* Drawer Footer CTA */
  .ocs-drawer-footer {
    padding: 20px !important;
    margin-top: 10px !important;
  }

  .btn-drawer-cta {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 25px !important;
  }

  /* ============================================================
     Category Page on Tablet (<= 992px)
     ============================================================ */
  .ocs-category-hero {
    margin: 30px 0 20px !important;
    text-align: center !important;
  }

  .ocs-category-huge-title {
    font-size: 38px !important;
    letter-spacing: 1.5px !important;
    line-height: 1.15 !important;
  }

  .ocs-category-subtitle {
    font-size: 16px !important;
    margin-bottom: 25px !important;
  }

  .ocs-guarantee-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    padding: 20px 0 !important;
    margin-bottom: 35px !important;
  }

  .ocs-product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px 18px !important;
    margin: 15px 0 45px !important;
  }

  /* ============================================================
     Product Detail Page on Tablet (<= 992px)
     ============================================================ */
  .ocs-product-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 35px !important;
    margin-top: 0 !important;
  }

  .ocs-product-gallery {
    min-height: auto !important;
    height: auto !important;
    padding: 35px 20px !important;
    border-radius: 10px !important;
  }

  .ocs-product-gallery img#mainProductImg {
    max-height: 320px !important;
  }

  .ocs-product-info h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }

  .ocs-pill-tabs {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .ocs-pill-tab {
    flex-shrink: 0 !important;
  }

  /* General Grid Elements */
  .ocs-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ocs-hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .ocs-hero-visual {
    order: -1;
    margin-bottom: 20px;
  }

  .ocs-hero-visual img {
    max-width: 380px;
  }

  .ocs-partner-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .ocs-features-grid {
    grid-template-columns: 1fr;
  }

  .ocs-split-grid {
    grid-template-columns: 1fr;
  }

  .ocs-portfolio-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ocs-upgrade-section {
    background: #EDF4FF;
  }

  .ocs-upgrade-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ocs-upgrade-right {
    background: #7928CA;
    padding: 40px;
    border-radius: var(--ocs-radius-md);
  }

  .ocs-testimonials-grid {
    grid-template-columns: 1fr;
  }

  .ocs-lead-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ocs-lead-form {
    margin: 0 auto;
  }

  .ocs-footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .ocs-footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .ocs-cta-box {
    padding: 36px 20px !important;
  }

  .ocs-cta-title {
    font-size: 22px !important;
  }

  .ocs-cta-desc {
    font-size: 14px !important;
  }

  .btn-cta-consult {
    width: 100% !important;
    justify-content: center !important;
  }

  .btn-catalog-view-all {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ============================================================
   3. MOBILE SCREEN SIZES (<= 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Category Page Hero */
  .ocs-category-hero {
    margin: 20px 0 16px !important;
    text-align: center !important;
  }

  .ocs-category-huge-title {
    font-size: 28px !important;
    letter-spacing: 1px !important;
    line-height: 1.2 !important;
    margin: 4px 0 8px !important;
  }

  .ocs-category-subtitle {
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 20px !important;
  }

  /* 4 Guarantee Items: 1-to-1 Specialist Style Stack */
  .ocs-guarantee-bar {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px 0 !important;
    margin-bottom: 24px !important;
    border-top: 1px solid #E2E8F0 !important;
    border-bottom: 1px solid #E2E8F0 !important;
  }

  .ocs-guarantee-item {
    background: #F8FAFC !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
  }

  .ocs-guarantee-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .ocs-guarantee-text h4 {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    margin: 0 0 2px 0 !important;
  }

  .ocs-guarantee-text p {
    font-size: 11.5px !important;
    color: #64748B !important;
    margin: 0 !important;
  }

  /* Product Page Full Width Action Buttons */
  .ocs-product-info h1 {
    font-size: 24px !important;
    line-height: 1.25 !important;
  }

  .ocs-action-buttons,
  .ocs-product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .btn-buy-now,
  .btn-secondary-action,
  .btn-product-demo,
  .ocs-product-info .btn-buy,
  .ocs-product-info .btn-quick-order {
    width: 100% !important;
    padding: 11px 20px !important;
    font-size: 14px !important;
    justify-content: center !important;
    text-align: center !important;
    display: flex !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   4. SMALL MOBILE SIZES (<= 540px)
   ============================================================ */
@media (max-width: 540px) {
  /* Category Product Grid: Single Column with clean card proportions */
  .ocs-product-grid {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
    margin: 15px 0 35px !important;
  }

  .ocs-product-card {
    max-width: 380px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }

  .ocs-product-image {
    height: 240px !important;
    border-radius: 8px !important;
  }

  .ocs-product-image img {
    max-height: 180px !important;
  }

  .ocs-product-title a {
    font-size: 15px !important;
  }

  .btn-product-buy {
    padding: 11px 20px !important;
    font-size: 13px !important;
  }

  /* Product Gallery on small phones */
  .ocs-product-gallery {
    padding: 24px 14px !important;
  }

  .ocs-product-gallery img#mainProductImg {
    max-height: 240px !important;
  }

  .ocs-product-price-huge {
    font-size: 32px !important;
    margin: 15px 0 !important;
  }

  /* Hero & Other Sections on Mobile */
  .ocs-hero-title {
    font-size: 32px !important;
  }

  .ocs-section-title {
    font-size: 26px !important;
  }

  .ocs-hero-cards {
    grid-template-columns: 1fr !important;
  }

  .ocs-split-left {
    grid-template-columns: 1fr !important;
    padding: 24px 16px !important;
  }

  .ocs-action-buttons {
    flex-direction: column !important;
  }

  .ocs-lead-form {
    flex-direction: column !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    gap: 12px !important;
  }

  .ocs-lead-input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 13px 18px !important;
  }

  .btn-lead-submit {
    width: 100% !important;
  }
}
