/* --- Vavy Theme - Mobile Responsive Styles --- */

/* --- Tablet Breakpoint (768px) --- */
@media (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1rem; }

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Header */
    .header-container {
        padding: 0 1rem;
    }

    .site-logo {
        font-size: 1.5rem;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }

    .main-navigation.active {
        max-height: 500px;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 1.5rem 0;
    }

    .main-navigation li {
        border-bottom: 1px solid #eee;
    }

    .main-navigation a {
        display: block;
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }

    .main-navigation a::after {
        display: none;
    }

    .header-actions {
        gap: 1rem;
    }

    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
    }

    /* Collections Grid */
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .collection-item {
        height: 400px;
    }

    /* Product Grid */
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Promo Grid */
    .promo-grid {
        grid-template-columns: 1fr;
    }

    /* Single Product */
    .single-product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery-section {
        position: static;
    }

    .woocommerce div.product .product_title {
        font-size: 1.5rem;
    }

    .woocommerce div.product p.price {
        font-size: 1.2rem;
    }

    /* Cart & Checkout */
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-summary-section,
    .checkout-summary-section {
        position: static;
    }

    .col2-set {
        grid-template-columns: 1fr;
    }

    /* Account */
    .account-container {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }

    .account-sidebar ul {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .account-sidebar li {
        margin-bottom: 0;
    }

    .account-content {
        padding: 0;
    }

    /* Archive */
    .archive-layout {
        grid-template-columns: 1fr;
    }

    .filter-toggle {
        display: flex;
    }

    .filters-wrapper {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #eee;
        padding: 1.5rem;
        z-index: 100;
        max-height: 400px;
        overflow-y: auto;
    }

    .filters-wrapper.active {
        display: flex;
    }

    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Mobile Breakpoint (480px) --- */
@media (max-width: 480px) {
    /* Typography */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1rem; }
    h4 { font-size: 0.9rem; }

    /* Container */
    .container {
        padding: 0 0.75rem;
    }

    .header-container {
        padding: 0 0.75rem;
    }

    /* Header */
    .site-logo {
        font-size: 1.2rem;
    }

    .header-actions {
        gap: 0.5rem;
        font-size: 0.7rem;
    }

    .header-action-icon svg {
        width: 18px;
        height: 18px;
    }

    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }

    /* Hero Section */
    .homepage-hero {
        height: 60vh;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }

    /* Collections */
    .collection-item {
        height: 300px;
    }

    .collection-info h3 {
        font-size: 1.2rem;
    }

    /* Product Grid */
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .vavy-product-title {
        font-size: 0.8rem;
    }

    .vavy-product-price {
        font-size: 0.8rem;
    }

    /* Single Product */
    .woocommerce div.product .product_title {
        font-size: 1.2rem;
    }

    .woocommerce div.product p.price {
        font-size: 1rem;
    }

    .woocommerce div.product .button.alt {
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }

    .woocommerce div.product .quantity input {
        width: 50px;
    }

    .woocommerce div.product .variations select {
        font-size: 0.9rem;
    }

    /* Related Products */
    .related.products ul.products {
        grid-template-columns: 1fr;
    }

    /* Cart */
    .cart-header h1,
    .checkout-header h1,
    .account-header h1 {
        font-size: 1.5rem;
    }

    .shop_table {
        font-size: 0.75rem;
    }

    .shop_table th,
    .shop_table td {
        padding: 0.5rem;
    }

    .product-thumbnail img {
        max-width: 50px;
    }

    .product-quantity input {
        width: 45px;
    }

    .actions {
        flex-direction: column;
    }

    .actions .button {
        width: 100%;
    }

    /* Checkout */
    .col-1, .col-2 {
        padding: 1rem;
    }

    .woocommerce-checkout .form-row input,
    .woocommerce-checkout .form-row select,
    .woocommerce-checkout .form-row textarea {
        font-size: 0.9rem;
    }

    .woocommerce-checkout-review-order {
        padding: 1rem;
    }

    /* Account */
    .account-sidebar ul {
        flex-direction: column;
        gap: 0;
    }

    .account-sidebar li {
        border-bottom: 1px solid #eee;
        margin-bottom: 0;
    }

    .account-sidebar a {
        padding: 1rem 0;
    }

    .account-content h2 {
        font-size: 1.2rem;
    }

    .account-content table {
        font-size: 0.85rem;
    }

    .account-content table th,
    .account-content table td {
        padding: 0.75rem 0;
    }

    /* Promo */
    .promo-item h4 {
        font-size: 0.85rem;
    }

    .promo-item p {
        font-size: 0.75rem;
    }

    /* Footer */
    .site-footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-top {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .footer-title {
        font-size: 0.9rem;
    }

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

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        margin-bottom: 0.5rem;
    }

    .site-info {
        font-size: 0.7rem;
    }
}

/* --- Small Mobile Breakpoint (360px) --- */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }

    h1 { font-size: 1.2rem; }
    h2 { font-size: 1rem; }

    .site-logo {
        font-size: 1rem;
    }

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

    .woocommerce div.product .product_title {
        font-size: 1rem;
    }

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

    .shop_table th,
    .shop_table td {
        padding: 0.4rem;
        font-size: 0.7rem;
    }
}

/* --- Touch-friendly Elements --- */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch devices */
    a:hover {
        opacity: 1;
    }

    .button:hover {
        background-color: #000;
    }
}

/* --- Landscape Orientation --- */
@media (max-height: 600px) and (orientation: landscape) {
    .homepage-hero {
        height: 50vh;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .site-header {
        padding: 0.75rem 0;
    }
}

/* --- Print Styles --- */
@media print {
    .site-header,
    .site-footer,
    .header-actions,
    .menu-toggle,
    .filter-toggle,
    .cart-summary-section,
    .checkout-summary-section {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
    }
}
