/* =====================================================
   MOBILE RESPONSIVE STYLES - Minimalist & Professional
   ===================================================== */

/* Base Mobile Styles */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 16px;
    }

    /* Header & Navbar */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .navbar {
        padding: 12px 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-left {
        flex: 1;
        min-width: 0;
    }

    .logo {
        font-size: 1.3rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .logo img {
        max-height: 35px !important;
    }

    /* Mobile Menu Toggle */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        z-index: 1001;
    }

    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Dark mode toggle */
    .dark-mode-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px 12px;
        font-size: 1.2rem;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1002;
        position: relative;
    }

    .dark-mode-toggle:hover {
        background: rgba(0,0,0,0.05);
    }

    .dark-mode-toggle .toggle-label {
        display: none;
    }

    /* Navigation Links - Mobile */
    .nav-links {
        display: none;
        position: fixed;
        top: 55px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: calc(100vh - 55px);
        overflow-y: auto;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links a {
        display: block;
        padding: 14px 20px;
        color: #333;
        font-size: 0.95rem;
    }

    .nav-links a:hover {
        background: #f8f9fa;
        color: #667eea;
    }

    .nav-links .btn {
        margin: 12px 20px;
        text-align: center;
    }

    /* Hero Section */
    .hero-section {
        padding: 60px 20px 40px;
        margin-top: 55px;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

    /* Search & Filter */
    .search-filter-container {
        margin: 1rem 0;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .search-box input {
        width: 100%;
        padding: 12px 16px;
    }

    .search-box .btn {
        width: 100%;
    }

    /* Page Title */
    .page-title {
        font-size: 1.3rem;
        margin: 1rem 0;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        padding: 10px;
    }

    .product-image {
        height: 120px;
    }

    .product-name {
        font-size: 0.85rem;
        margin: 8px 0 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-price {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .btn-group {
        flex-direction: column;
        gap: 6px;
    }

    .btn-group .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* Best Seller Badge */
    .best-seller-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    /* Wishlist Heart */
    .wishlist-heart {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    /* Popular Products */
    .popular-products-section {
        margin: 1rem 0;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Footer */
    footer {
        padding: 2rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.85rem;
    }

    .social-links {
        justify-content: flex-start;
    }

    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    /* Kuesioner Section */
    [style*="background: linear-gradient(135deg, #667eea"] {
        padding: 1.5rem !important;
    }

    [style*="background: linear-gradient(135deg, #667eea"] h2 {
        font-size: 1.2rem !important;
    }

    [style*="background: linear-gradient(135deg, #667eea"] p {
        font-size: 0.9rem !important;
    }

    /* Empty State */
    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state-icon svg {
        width: 40px;
        height: 40px;
    }

    .empty-state-text {
        font-size: 0.9rem;
    }

    /* Product Count */
    .product-count {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
}

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

    .logo {
        font-size: 1.1rem;
        max-width: 120px;
    }

    .hero-section {
        padding: 50px 16px 30px;
    }

    .hero-section h1 {
        font-size: 1.3rem;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-image {
        height: 100px;
    }

    .product-name {
        font-size: 0.8rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .btn-group .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Cart specific */
    .dmc-cart-item {
        flex-direction: column;
        text-align: center;
    }

    .dmc-item-image {
        width: 100%;
    }

    .dmc-item-details {
        width: 100%;
    }

    .dmc-quantity-controls {
        justify-content: center;
    }

    /* Checkout */
    .checkout-form {
        padding: 1rem;
    }

    .checkout-form h2 {
        font-size: 1.2rem;
    }

    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Modal */
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    /* Toast */
    #toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast-message {
        min-width: auto;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

/* =====================================================
   TABLET (481px - 768px)
   ===================================================== */
@media (min-width: 481px) and (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-image {
        height: 140px;
    }
}

/* =====================================================
   LARGE MOBILE / SMALL TABLET (769px - 1024px)
   ===================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

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

    .product-image {
        height: 160px;
    }
}

/* =====================================================
   DARK MODE MOBILE ADJUSTMENTS
   ===================================================== */
@media (max-width: 768px) {
    body.dark-mode .nav-links {
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
    }

    body.dark-mode .nav-links li {
        border-bottom-color: var(--border-color);
    }

    body.dark-mode .nav-links a {
        color: var(--text-primary);
    }

    body.dark-mode .nav-links a:hover {
        background: var(--bg-hover);
    }

    body.dark-mode .menu-toggle span {
        background: var(--text-primary);
    }

    body.dark-mode header {
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
    }

    body.dark-mode .logo {
        background: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

/* =====================================================
   SMOOTH SCROLL & ANIMATIONS
   ===================================================== */
* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.nav-links::-webkit-scrollbar {
    width: 4px;
}

.nav-links::-webkit-scrollbar-track {
    background: transparent;
}

.nav-links::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-links a,
    .product-card,
    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }
}