/**
 * Teymur Seramik & Vitrifiye - Responsive Stylesheet
 */

/* Strictly hide mobile controls on desktop */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
  .mobile-drawer,
  .mobile-drawer-overlay {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid,
  .footer-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .benefit-col {
    padding: 0 6px;
  }

  .benefit-line-1,
  .benefit-line-2 {
    font-size: 11px;
  }

  /* Special Project 1024px Adjustments */
  .special-project-panel {
    width: 270px;
    padding: 14px 14px 14px 44px;
    clip-path: polygon(45px 0%, 100% 0%, calc(100% - 45px) 100%, 0% 100%);
  }

  .special-title-line1 {
    font-size: 24px;
  }

  .special-title-line2 {
    font-size: 32px;
  }

  .special-project-script {
    font-size: 26px;
  }

  .special-brand-item {
    padding: 0 10px;
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    height: auto;
    padding: 12px 0;
    gap: 12px;
    flex-wrap: wrap;
  }

  .site-logo {
    width: auto;
  }

  .site-logo .brand-title {
    font-size: 28px;
  }

  .site-logo .sub-line {
    width: 14px;
  }

  .site-logo .sub-text {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .header-search {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin: 4px 0 0 0;
  }

  .header-actions {
    gap: 18px;
  }

  .action-title {
    display: none;
  }

  .main-navbar {
    display: none; /* Handled by mobile drawer on mobile */
  }

  .mobile-menu-toggle {
    display: flex !important;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #07345F;
    padding: 4px;
    align-items: center;
    justify-content: center;
  }

  /* Hero Slider Responsive */
  .hero-slider-wrapper {
    height: 380px;
  }

  .hero-slide {
    background-position: center;
  }

  .hero-slide-content {
    max-width: 100%;
  }

  .hero-title-line1,
  .hero-title-line2 {
    font-size: 28px;
  }

  .hero-slide-desc {
    font-size: 12.5px;
    margin-bottom: 14px;
  }

  .hero-whatsapp-bubble {
    display: none; /* Keep clean on small mobile overlay */
  }

  /* Benefits Strip Responsive (Displays 2 or 3 items side-by-side on mobile) */
  .benefits-strip-section {
    height: auto;
    padding: 14px 0;
    background: #ffffff;
    border-bottom: 1px solid #EEF2F6;
  }

  .benefits-strip-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
  }

  .benefit-divider {
    display: none !important;
  }

  .benefit-col {
    flex: initial;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 9px 10px;
    background: #F8FAFD;
    border: 1px solid #E5EDF4;
    border-radius: 8px;
    min-width: 0;
  }

  .benefit-icon-box {
    flex-shrink: 0;
    color: #07345F;
  }

  .benefit-icon-box svg {
    width: 22px;
    height: 22px;
  }

  .benefit-text-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
  }

  .benefit-line-1,
  .benefit-line-2 {
    font-size: 11px;
    line-height: 1.25;
    font-weight: 600;
    color: #07345F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .category-main-title {
    font-size: 22px;
  }

  .category-pretitle {
    font-size: 11.5px;
  }

  .category-card-img {
    height: 140px;
  }

  .category-card-bottom {
    padding: 10px 12px;
    min-height: 44px;
  }

  .category-card-name {
    font-size: 12.5px;
  }

  /* Product Cards & Add To Cart Button Mobile Responsive Styling */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 2px !important;
    overflow: hidden;
  }

  .product-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: unset;
    max-height: unset;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
  }

  .product-thumb img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .product-info {
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .product-category {
    font-size: 10px;
    margin-bottom: 3px;
  }

  .product-title {
    font-size: 12px;
    height: 32px;
    line-height: 1.35;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .product-price-box {
    margin-top: auto;
    margin-bottom: 8px;
  }

  .product-price {
    font-size: 14.5px;
    font-weight: 700;
  }

  .product-old-price {
    font-size: 11px;
  }

  .product-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  .btn-add-cart {
    flex: 1 !important;
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    letter-spacing: -0.01em !important;
  }

  .btn-add-cart svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  .btn-quick-view {
    width: 34px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
    border-radius: 1px !important;
  }

  .btn-quick-view svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* Product Detail Page Mobile Actions */
  .product-detail-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .product-detail-actions .detail-qty-box {
    width: 110px !important;
    height: 44px !important;
  }

  .product-detail-actions .btn-add-cart {
    flex: 1 1 calc(100% - 120px) !important;
    min-height: 44px !important;
    height: 44px !important;
    font-size: 13.5px !important;
    padding: 0 14px !important;
  }

  .product-detail-actions .btn-whatsapp-order {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    font-size: 13.5px !important;
    justify-content: center !important;
  }

  .brands-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  /* Newsletter responsive */
  .newsletter-content-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    text-align: center;
  }

  .newsletter-text-block {
    padding-left: 0;
  }

  .newsletter-action-block {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .newsletter-form-box {
    width: 100%;
    flex-direction: column;
  }

  .newsletter-email-input {
    width: 100%;
  }

  .newsletter-submit-btn {
    width: 100%;
  }

  .newsletter-plane-decor {
    display: none;
  }

  .newsletter-leaf-bg {
    opacity: 0.35;
    max-width: 130px;
  }

  .newsletter-leaf-img {
    max-height: 80px;
  }

  /* Footer Mobile Grid: Corporate and Categories SIDE-BY-SIDE */
  .footer-grid,
  .footer-main-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px 14px !important;
  }

  .footer-col-brand {
    grid-column: 1 / -1 !important;
    margin-bottom: 6px;
  }

  .footer-col-corporate {
    grid-column: 1 / 2 !important;
  }

  .footer-col-categories {
    grid-column: 2 / 3 !important;
  }

  .footer-col-contact {
    grid-column: 1 / -1 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-top: 18px !important;
    margin-top: 4px;
  }

  .footer-nav-title {
    font-size: 14px !important;
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .footer-links-list {
    gap: 2px !important;
  }

  .footer-links-list li {
    margin-bottom: 2px !important;
    padding: 0 !important;
  }

  .footer-links-list a {
    font-size: 12px !important;
    line-height: 1.2 !important;
    display: inline-block;
    padding: 1px 0 !important;
  }

  .footer-bottom,
  .footer-bottom-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* WhatsApp Float positioned on the LEFT */
  .whatsapp-float {
    bottom: 20px !important;
    left: 16px !important;
    right: auto !important;
    padding: 8px 14px 8px 12px !important;
    gap: 8px !important;
    z-index: 99990 !important;
  }

  /* Toast Notification mobile positioning (always above mobile WhatsApp float button) */
  .toast-container {
    bottom: 85px !important;
    left: 16px !important;
    right: 16px !important;
    max-width: calc(100vw - 32px) !important;
    z-index: 999999 !important;
  }

  .whatsapp-float-icon svg {
    width: 24px;
    height: 24px;
  }

  .whatsapp-float-title {
    font-size: 12px;
  }

  .whatsapp-float-sub {
    font-size: 9.5px;
  }

  /* Scroll To Top button on the RIGHT */
  .scroll-top-float {
    bottom: 20px !important;
    right: 16px !important;
    width: 44px !important;
    height: 44px !important;
    z-index: 99999 !important;
  }

  .scroll-top-float.visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
  }

  /* Special Project 768px Mobile Adjustments */
  .special-project-section {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .special-project-banner {
    height: auto;
    padding: 28px 0 20px;
  }

  .special-project-bg-left {
    width: 100%;
    opacity: 0.18;
  }

  .special-project-bg-right {
    display: none;
  }

  .special-project-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .special-project-content {
    max-width: 100%;
    padding-left: 0;
  }

  .special-project-panel {
    position: static;
    width: 100%;
    clip-path: none;
    border-radius: 12px;
    padding: 16px;
    box-shadow: none;
  }

  .special-panel-divider {
    width: 100%;
    margin: 8px 0;
  }

  .special-brands-strip {
    height: auto;
    padding: 20px 0;
  }

  .special-brands-container {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .special-brands-intro {
    margin-right: 0;
    align-items: center;
  }

  .special-brands-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .special-brand-sep {
    display: none;
  }

  .special-brand-item {
    flex: 0 0 calc(33.33% - 12px);
    min-width: 80px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .benefits-strip-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .benefit-col {
    padding: 8px 8px !important;
    gap: 7px !important;
  }

  .benefit-col:nth-of-type(5) {
    grid-column: span 2;
    justify-content: center;
  }

  .benefit-icon-box svg {
    width: 20px !important;
    height: 20px !important;
  }

  .benefit-line-1,
  .benefit-line-2 {
    font-size: 10.5px !important;
    letter-spacing: -0.01em;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .category-card-img {
    height: 125px;
  }

  .category-card-bottom {
    padding: 8px 10px;
    min-height: 40px;
  }

  .category-card-name {
    font-size: 11.5px;
  }

  .category-header-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }

  .category-main-title {
    font-size: 20px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-info {
    padding: 8px 6px !important;
  }

  .product-title {
    font-size: 11px !important;
    height: 30px !important;
    line-height: 1.3 !important;
  }

  .product-price {
    font-size: 13.5px !important;
  }

  .product-actions {
    gap: 4px !important;
  }

  .btn-add-cart {
    height: 34px !important;
    font-size: 10.5px !important;
    padding: 0 4px !important;
    gap: 3px !important;
  }

  .btn-add-cart svg {
    width: 13px !important;
    height: 13px !important;
  }

  .btn-quick-view {
    width: 32px !important;
    height: 34px !important;
  }

  .btn-quick-view svg {
    width: 14px !important;
    height: 14px !important;
  }

  .footer-grid,
  .footer-main-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px 10px !important;
  }

  .footer-nav-title {
    font-size: 13px !important;
  }

  .footer-links-list {
    gap: 2px !important;
  }

  .footer-links-list li {
    margin-bottom: 2px !important;
    padding: 0 !important;
  }

  .footer-links-list a {
    font-size: 11.5px !important;
    line-height: 1.2 !important;
    display: inline-block;
    padding: 1px 0 !important;
  }

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

  .special-title-line2 {
    font-size: 30px;
  }

  .special-project-script {
    font-size: 24px;
  }

  .special-brand-item {
    flex: 0 0 calc(50% - 10px);
  }

  /* Product Detail Page Mobile Optimization */
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .product-main-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .product-gallery-box {
    height: 260px !important;
    max-width: 100% !important;
  }

  .product-gallery-box img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  .product-detail-title {
    font-size: 20px !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .product-price-box {
    padding: 14px !important;
  }

  .product-price-main {
    font-size: 26px !important;
  }

  .product-cart-row {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .product-cart-row .qty-selector-wrap {
    width: 100% !important;
    height: 48px !important;
    justify-content: space-between;
  }

  .product-cart-row .qty-selector-wrap input,
  .product-cart-row .qty-selector-wrap button {
    flex: 1;
    height: 48px !important;
  }

  .product-cart-row .cart-actions-wrap {
    width: 100% !important;
    display: flex !important;
    gap: 10px !important;
  }

  .product-cart-row .btn-add-cart {
    flex: 1 !important;
    height: 48px !important;
    padding: 13px 22px !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
  }

  .product-cart-row .product-wishlist-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    border-radius: 2px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .product-tabs-header {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
  }

  .product-tabs-header button {
    padding: 12px 14px !important;
    font-size: 13px !important;
    flex-shrink: 0;
  }

  .product-trust-strip {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .product-tab-pane img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Comprehensive Site-Wide Mobile Responsive Rules (Cart, Checkout, Category, Account, Orders, Favorites, Forms, Tables, Modals) */
  .contact-grid,
  .container > div[style*="grid-template-columns"],
  .container div[style*="grid-template-columns: 2fr 1fr"],
  .container div[style*="grid-template-columns: 260px 1fr"],
  .container div[style*="grid-template-columns: 240px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .form-row-2col,
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  table {
    display: block !important;
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-box {
    width: 92% !important;
    max-width: 100% !important;
    padding: 16px !important;
    margin: 16px auto !important;
    max-height: 85vh !important;
  }

  input, select, textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 360px) {
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .product-main-grid {
    padding: 10px !important;
  }

  .product-gallery-box {
    height: 220px !important;
    padding: 10px !important;
  }

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

  .product-price-main {
    font-size: 22px !important;
  }
}
