/* ============================================
   CaliOptik - Responsive Breakpoints
   ============================================ */

/* ===== Large Desktop (max-width: 1200px) ===== */
@media (max-width: 1200px) {
    :root {
        --co-container: 100%;
    }

    .co-hero__title {
        font-size: var(--co-text-5xl);
    }

    .co-categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .co-footer__grid {
        grid-template-columns: 1.2fr 1fr 1fr 1fr;
        gap: var(--co-space-6);
    }
}

/* ===== Tablet Landscape (max-width: 991px) ===== */
@media (max-width: 991px) {
    .co-hero {
        height: 70vh;
    }

    .co-hero__title {
        font-size: var(--co-text-4xl);
    }

    .co-hero__description {
        font-size: var(--co-text-base);
    }

    .co-section {
        padding-top: var(--co-space-16);
        padding-bottom: var(--co-space-16);
    }

    .co-section-header__title {
        font-size: var(--co-text-3xl);
    }

    /* Shop layout - stack sidebar */
    .co-shop-layout {
        grid-template-columns: 1fr;
    }

    .co-shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        height: 100vh;
        max-height: 100vh;
        background: var(--co-bg);
        z-index: var(--co-z-modal);
        padding: var(--co-space-6);
        transform: translateX(-100%);
        transition: transform var(--co-transition-slow);
        box-shadow: var(--co-shadow-2xl);
    }

    .co-shop-sidebar.co-active {
        transform: translateX(0);
    }

    .co-filter-toggle {
        display: inline-flex;
    }

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

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

    /* Product detail */
    .co-product-detail__inner {
        grid-template-columns: 1fr;
        gap: var(--co-space-8);
    }

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

    /* Campaign */
    .co-campaign__inner {
        grid-template-columns: 1fr;
    }

    .co-campaign__content {
        padding: var(--co-space-10);
    }

    .co-campaign__title {
        font-size: var(--co-text-3xl);
    }

    /* Instagram */
    .co-instagram__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Footer */
    .co-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--co-space-8);
    }

    .co-footer__col--brand {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    /* Checkout */
    .woocommerce-checkout .col2-set {
        grid-template-columns: 1fr;
        gap: var(--co-space-6);
    }
}

/* ===== Tablet Portrait (max-width: 768px) ===== */
@media (max-width: 768px) {
    h1 { font-size: var(--co-text-3xl); }
    h2 { font-size: var(--co-text-2xl); }
    h3 { font-size: var(--co-text-xl); }

    .co-section {
        padding-top: var(--co-space-12);
        padding-bottom: var(--co-space-12);
    }

    .co-section-header__title {
        font-size: var(--co-text-2xl);
    }

    .co-container {
        padding-left: var(--co-space-4);
        padding-right: var(--co-space-4);
    }

    /* Hero */
    .co-hero {
        height: 60vh;
        min-height: 400px;
    }

    .co-hero__title {
        font-size: var(--co-text-3xl);
    }

    .co-hero__subtitle {
        font-size: var(--co-text-xs);
    }

    .co-hero__description {
        font-size: var(--co-text-sm);
        margin-bottom: var(--co-space-6);
    }

    .co-hero__actions {
        flex-direction: column;
    }

    .co-hero__btn {
        width: 100%;
        justify-content: center;
        padding: var(--co-space-3) var(--co-space-6);
        font-size: var(--co-text-xs);
    }

    .co-hero__scroll {
        display: none;
    }

    /* Categories */
    .co-categories__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--co-space-4);
    }

    .co-category-card {
        aspect-ratio: 3/4;
    }

    .co-category-card__name {
        font-size: var(--co-text-lg);
    }

    /* Product grids */
    .co-products-grid,
    .co-product-grid,
    .related.products .products {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--co-space-4);
    }

    .co-product-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--co-space-2);
    }

    .co-product-section__title {
        font-size: var(--co-text-2xl);
    }

    /* Product card */
    .co-product-card__info {
        padding: var(--co-space-3);
    }

    .co-product-card__actions {
        display: none;
    }

    /* Product detail */
    .co-product-info__title {
        font-size: var(--co-text-2xl);
    }

    .co-product-info__price .price {
        font-size: var(--co-text-xl);
    }

    .co-trust-badges {
        flex-direction: column;
        gap: var(--co-space-3);
    }

    .woocommerce-tabs .tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .woocommerce-tabs .tabs::-webkit-scrollbar {
        display: none;
    }

    /* Brands */
    .co-brands__grid {
        gap: var(--co-space-6);
    }

    .co-brand-logo img {
        max-width: 100px;
    }

    /* Campaign */
    .co-campaign__content {
        padding: var(--co-space-8);
    }

    .co-campaign__title {
        font-size: var(--co-text-2xl);
    }

    /* Instagram */
    .co-instagram__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Newsletter */
    .co-newsletter__title {
        font-size: var(--co-text-2xl);
    }

    .co-newsletter__form {
        flex-direction: column;
    }

    .co-newsletter__submit {
        width: 100%;
    }

    /* Cart */
    .woocommerce-cart-form .actions {
        flex-direction: column;
    }

    .woocommerce-cart-form .actions .coupon {
        width: 100%;
    }

    .woocommerce-cart-form .actions .coupon input {
        width: 100%;
    }

    .cart_totals {
        max-width: 100%;
    }

    /* Footer */
    .co-footer__grid {
        grid-template-columns: 1fr;
        gap: var(--co-space-6);
    }

    .co-footer__col--brand {
        padding-right: 0;
    }

    .co-footer__bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== Mobile (max-width: 576px) ===== */
@media (max-width: 576px) {
    .co-hero {
        height: 55vh;
        min-height: 350px;
    }

    .co-hero__title {
        font-size: var(--co-text-2xl);
    }

    .co-categories__grid {
        gap: var(--co-space-3);
    }

    .co-category-card__content {
        padding: var(--co-space-4);
    }

    .co-category-card__name {
        font-size: var(--co-text-base);
    }

    /* Single column products on very small screens */
    .co-products-grid,
    .co-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--co-space-3);
    }

    .co-product-card .woocommerce-loop-product__title {
        font-size: var(--co-text-sm);
    }

    .co-product-card .price {
        font-size: var(--co-text-sm);
    }

    /* Cart table responsive */
    .woocommerce-cart-form table.shop_table thead {
        display: none;
    }

    .woocommerce-cart-form table.shop_table tbody tr {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: var(--co-space-3);
        padding: var(--co-space-4) 0;
        border-bottom: 1px solid var(--co-border-light);
    }

    .woocommerce-cart-form table.shop_table td {
        padding: var(--co-space-1) 0;
        border: none;
    }

    .woocommerce-cart-form .product-thumbnail {
        grid-row: 1 / 4;
        width: auto;
    }

    .woocommerce-cart-form .product-subtotal {
        font-weight: var(--co-font-bold);
    }

    /* Product detail */
    .co-product-gallery__thumb {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .co-product-info__add-to-cart form.cart {
        flex-direction: column;
    }

    .co-product-info__add-to-cart .quantity {
        width: 100%;
        justify-content: center;
    }

    .co-product-info__add-to-cart .quantity .qty {
        flex: 1;
    }

    /* Instagram */
    .co-instagram__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Header */
    .co-header__inner {
        height: 60px;
    }

    .co-header__logo-text {
        font-size: var(--co-text-xl);
    }

    /* Breadcrumb */
    .co-breadcrumb .co-container {
        font-size: var(--co-text-xs);
    }
}

/* ===== Hover disabled on touch devices ===== */
@media (hover: none) {
    .co-product-card:hover {
        box-shadow: none;
    }

    .co-product-card:hover .co-product-card__image-wrap img {
        transform: none;
    }

    .co-product-card__actions {
        opacity: 1;
        transform: translateY(0);
        background: transparent;
    }

    .co-category-card:hover .co-category-card__image img {
        transform: none;
    }

    .co-category-card__link {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Print Styles ===== */
@media print {
    .co-announcement,
    .co-header__actions,
    .co-header__mobile-toggle,
    .co-footer__social,
    .co-newsletter,
    .co-instagram {
        display: none !important;
    }

    .co-header {
        position: static;
        border-bottom: 2px solid #000;
    }

    .co-footer {
        background: #fff;
        color: #000;
    }
}
