/* Mobile-First Responsive Design for BearFaceRhino */

/* Base Mobile Styles (320px - 480px) */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        padding: 0.5rem 1rem;
    }
    
    nav .container {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-logo {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 0.5rem;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Cart icon in nav */
    .cart-icon {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 100;
        background: var(--primary-color);
        padding: 15px;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    
    /* Hero Section */
    .hero {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-3d-animation {
        min-height: 300px;
        padding: 1rem 0;
    }
    
    .logo-3d-container {
        width: 280px;
        height: 320px;
    }
    
    .logo-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .logo-image {
        width: 200px;
        height: 200px;
    }
    
    /* 3D Print Progress */
    .print-progress {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Categories Section */
    .categories {
        padding: 3rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .category-card {
        padding: 2rem 1.5rem;
    }
    
    .category-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    /* Products Display */
    .products-display {
        padding: 2rem 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }
    
    .product-card {
        width: 100%;
        margin: 0;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1.2rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    /* Features Section */
    .features {
        padding: 3rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    /* Process Section */
    .process {
        padding: 3rem 1rem;
    }
    
    .process-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .process-step {
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .process-step::after {
        display: none; /* Hide connecting arrows on mobile */
    }
    
    /* Reviews Section */
    .reviews {
        padding: 3rem 1rem;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .review-card {
        padding: 1.5rem;
    }
    
    /* Contact Section */
    .contact {
        padding: 3rem 1rem;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-form {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    /* Footer */
    footer {
        padding: 2rem 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 1rem;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .checkout-modal .modal-content {
        padding: 1rem;
    }
    
    .checkout-header h2 {
        font-size: 1.5rem;
    }
    
    .checkout-content {
        flex-direction: column;
    }
    
    .checkout-form,
    .order-summary {
        width: 100%;
    }
    
    .order-summary {
        margin-top: 2rem;
        position: static;
    }
    
    /* Product Detail Modal */
    .product-modal .modal-content {
        flex-direction: column;
        padding: 1rem;
    }
    
    .product-modal-left,
    .product-modal-right {
        width: 100%;
    }
    
    .product-modal-image {
        height: 250px;
    }
    
    .product-modal-title {
        font-size: 1.5rem;
    }
    
    .product-modal-price {
        font-size: 2rem;
    }
    
    /* Cart */
    .cart-modal .modal-content {
        width: 95%;
        padding: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cart-item img {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }
    
    .quantity-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Buttons */
    .cta-button,
    .btn,
    .submit-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hero-buttons .cta-button {
        width: 100%;
        margin: 0;
    }
    
    /* Forms */
    input,
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Tables */
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    /* Hide non-essential elements on mobile */
    .desktop-only {
        display: none;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block;
    }
}

/* Small Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .logo-3d-container {
        width: 350px;
        height: 380px;
    }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    nav ul {
        flex-direction: row;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 80%;
    }
    
    .checkout-content {
        flex-direction: row;
    }
    
    .hero-buttons {
        flex-direction: row;
    }
}

/* Hamburger Menu for Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: 1rem;
        font-size: 1.5rem;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        z-index: 1001;
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 26, 0.98);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        z-index: 1000;
    }
    
    nav ul.mobile-menu-open {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Utility Classes for Mobile */
.mobile-hidden {
    display: none !important;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .mobile-hidden {
        display: block !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Touch-friendly spacing */
@media (max-width: 768px) {
    button,
    a,
    .clickable {
        min-height: 44px; /* iOS touch target size */
        min-width: 44px;
    }
    
    .cart-icon {
        width: 60px;
        height: 60px;
    }
}

/* Landscape Mobile Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 1rem;
    }
    
    .hero-3d-animation {
        min-height: 200px;
    }
    
    .logo-3d-container {
        width: 200px;
        height: 220px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
    
    input,
    textarea,
    select {
        -webkit-appearance: none;
        border-radius: 0;
    }
}