/* Porto E-commerce - Responsive Styles */

/* ========================================
   Tablet - 768px to 1024px
======================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .page-layout {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }

    .nav-menu {
        margin-left: 10px;
    }

    .nav-link {
        padding: 15px 12px;
        font-size: 12px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .product-card {
        border-radius: 10px;
    }
    
    .product-image {
        height: 280px;
    }
    
    .product-info {
        padding: 16px;
        gap: 10px;
    }
    
    .product-name {
        font-size: 14px;
        min-height: 42px;
        max-height: 42px;
    }
    
    .price-new {
        font-size: 22px;
    }
    
    .price-old {
        font-size: 15px;
    }
    
    .product-buttons {
        gap: 6px;
    }
    
    .add-to-cart-btn,
    .buy-now-btn {
        padding: 12px 8px;
        font-size: 10px;
    }
    
    .product-placeholder svg {
        width: 70px;
        height: 70px;
    }
    
    .placeholder-text {
        font-size: 14px;
    }
    
    .placeholder-size {
        font-size: 12px;
        padding: 6px 16px;
    }

    .hero-title {
        font-size: 36px;
    }

    .discount-badge {
        font-size: 24px;
        padding: 8px 20px;
    }

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

    /* Footer New Design */
    .footer-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        min-height: auto;
    }

    .footer-quick-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer-social-newsletter {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .map-container {
        height: 300px;
    }

    .footer-grid,
    .footer-grid-top,
    .footer-grid-bottom {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-col-wide {
        grid-column: span 2;
    }

    .footer-col-map {
        grid-column: span 2;
    }
}

/* ========================================
   Mobile - Below 768px
======================================== */
@media (max-width: 768px) {

    /* ── Top Bar → tamamen gizle ── */
    .top-bar { display: none !important; }

    /* ── Nav menüsü → tamamen gizle ── */
    .main-nav { display: none !important; }

    /* ── Header şeridi: sadece hamburger + arama ── */
    .main-header {
        padding: 0 !important;
        border-bottom: 1px solid #ececec;
    }

    /* Tüm header-content'i sütun yap */
    .header-content {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        padding: 0 !important;
        align-items: stretch !important;
        height: auto !important;
        min-height: unset !important;
    }

    /* ── Üst logo satırı kaldırıldı, logo drawer'da ── */
    .mob-header-top {
        display: none !important;
    }

    /* ── Header satırı: Hamburger + Arama + Bildirim ── */
    .mob-header-bottom {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 8px 12px !important;
    }

    /* Masaüstü header-content çocuklarını gizle,
       yerlerine mob-header-top/bottom kullanılacak */
    .header-content > .logo { display: none !important; }
    .header-content > .ms-wrap { display: none !important; }
    .header-content > .new-header-actions { display: none !important; }

    /* Arama kutusu alt satırda */
    .mob-header-bottom .ms-wrap {
        flex: 1 !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    .mob-header-bottom .ms-form {
        border-radius: 10px !important;
        border-width: 1.5px !important;
    }
    .mob-header-bottom .ms-input {
        font-size: 13px !important;
        padding: 9px 0 !important;
    }
    .mob-header-bottom .ms-btn {
        width: 36px !important;
        height: 36px !important;
        margin: 2px !important;
    }
    .mob-header-bottom .ms-icon { padding: 0 8px 0 12px !important; }

    /* Hamburger butonu */
    .mob-hamburger {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        border: 1.5px solid #e0e0e0 !important;
        border-radius: 10px !important;
        background: #fff !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        color: #111 !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    /* Masaüstü logo gizle mobilde, mobil header elemanları masaüstünde gizle */
    .mob-header-top  { display: none !important; }
    .mob-header-bottom { display: flex; }
    .logo-desktop    { display: none !important; }
    /* Masaüstünde da görünen orjinal logo'yu mobilde gizle */
    .header-content > .logo { display: none !important; }
    .new-cart-wrapper { display: none !important; }
    .hdr-auth-group { display: none !important; }
    #upBalance { display: none !important; }
    #upTrigger { display: none !important; }
    .call-us { display: none !important; }
    .search-bar { display: none !important; }
    .header-actions { display: none !important; }
    .social-icons { display: none !important; }
    .top-link { display: none !important; }

    /* ── Page Layout ── */
    .page-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar {
        position: static;
        display: none;
    }

    .sidebar.mobile-show {
        display: block;
    }

    /* Hero Slider */
    .slider-container {
        height: 350px;
    }

    .hero-content {
        flex-direction: column;
        padding: 30px 20px;
    }

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

    .hero-subtitle {
        font-size: 12px;
    }

    .discount-badge {
        font-size: 20px;
        padding: 8px 18px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .hero-image {
        display: none;
    }

    /* Banners */
    .banners-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .promo-banner-content {
        flex-direction: column;
        padding: 20px;
    }

    .promo-title {
        font-size: 20px;
    }

    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-card {
        font-size: 13px;
        border-radius: 10px;
    }

    .product-image {
        height: 240px;
    }

    .product-placeholder svg {
        width: 60px;
        height: 60px;
    }

    .placeholder-text {
        font-size: 13px;
    }

    .placeholder-size {
        font-size: 11px;
        padding: 6px 14px;
    }

    .product-info {
        padding: 14px;
        gap: 8px;
    }

    .product-name {
        font-size: 13px;
        min-height: 38px;
        max-height: 38px;
    }

    .product-actions {
        display: none;
    }

    .price-new {
        font-size: 20px;
    }

    .price-old {
        font-size: 14px;
    }

    .product-buttons {
        gap: 6px;
    }

    .add-to-cart-btn,
    .buy-now-btn {
        padding: 11px 6px;
        font-size: 9px;
    }

    /* CTA Section */
    .cta-banner {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .discount-price {
        font-size: 36px;
    }

    .cta-image {
        display: none;
    }

    /* Deal Banner */
    .deal-content {
        flex-direction: column;
        text-align: center;
    }

    .deal-title {
        font-size: 28px;
    }

    .deal-image {
        display: none;
    }

    /* Footer New Design */
    .footer-content-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-quick-links {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-social-newsletter {
        grid-template-columns: 1fr;
    }

    .info-card-content p strong {
        width: auto;
        display: block;
        margin-bottom: 3px;
    }

    .map-container {
        height: 280px;
    }

    .footer-info-card {
        padding: 20px;
    }

    .footer-map-section {
        padding: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-item {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }

    .footer-grid,
    .footer-grid-top,
    .footer-grid-bottom {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-col-wide { grid-column: span 1; }
    .footer-col-map  { grid-column: span 1; }

    .footer-map iframe { height: 250px; }

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

    .brands-slider {
        flex-wrap: wrap;
        gap: 20px;
    }

    .mobile-menu-toggle { display: none !important; }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-title { font-size: 20px; }
}

/* ========================================
   Small Mobile - Below 480px
======================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .logo img { height: 46px !important; }

    .ms-input { font-size: 12px !important; }
    .ms-btn { width: 34px !important; height: 34px !important; }

    .hero-title { font-size: 24px; }
    .discount-badge { font-size: 18px; }

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

    .product-image { height: 200px; }

    .product-placeholder svg { width: 50px; height: 50px; }
    .placeholder-text { font-size: 12px; }
    .placeholder-size { font-size: 10px; padding: 5px 12px; }

    .product-info { padding: 10px; }
    .product-name { font-size: 12px; min-height: 34px; max-height: 34px; }
    .price-new { font-size: 17px; }

    .add-to-cart-btn,
    .buy-now-btn {
        padding: 10px 4px;
        font-size: 8.5px;
    }

    .btn { padding: 12px 25px; font-size: 13px; }

    .footer-main { padding: 30px 0; }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 76px; /* bottom bar'ın üstünde kalsın */
        right: 14px;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .top-bar,
    .main-header,
    .main-nav,
    .sidebar,
    .footer-features,
    .footer-brands,
    .back-to-top,
    .mobile-menu-toggle,
    .mob-bottom-bar {
        display: none !important;
    }

    .page-layout {
        grid-template-columns: 1fr;
    }

    .product-card {
        break-inside: avoid;
    }
}

/* ========================================
   Mobil Alt Menü Çubuğu
======================================== */
@media (max-width: 768px) {
    /* Bar'ı göster */
    .mob-bottom-bar {
        display: flex !important;
    }

    /* Sayfa altında bar kadar boşluk */
    body {
        padding-bottom: 68px !important;
    }

    /* Footer'ın altına da boşluk */
    .new-footer {
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

@media (min-width: 769px) {
    .mob-bottom-bar      { display: none !important; }
    .mob-header-top      { display: none !important; }
    .mob-header-bottom   { display: none !important; }
    .mob-drawer-overlay  { display: none !important; }
    .mob-drawer          { display: none !important; }
    .mob-cart-modal-overlay { display: none !important; }
    .mob-cart-modal      { display: none !important; }
    .logo-desktop        { display: block !important; }
    body { padding-bottom: 0 !important; }
}
