/*
 * RESPONSIVE DESIGN - FitCore Theme
 * Mobile-First Approach
 * Breakpoints:
 * - Mobile: 0-767px
 * - Tablet: 768-1023px
 * - Desktop: 1024px+
 * - Large Desktop: 1280px+
 */

/* ===============================================
   VIEWPORT & BASE MOBILE
   =============================================== */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===============================================
   MOBILE FIRST (0-767px)
   =============================================== */

/* Header & Navigation */
.wp-block-navigation {
    font-size: 0.95rem;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
    padding: 8px;
}

/* Homepage Hero */
.hero-section {
    min-height: 400px !important;
    padding: 3rem 1.5rem !important;
}

.hero-section .wp-block-heading {
    font-size: 2rem !important;
    line-height: 1.2 !important;
}

.hero-section .has-large-font-size {
    font-size: 1rem !important;
}

/* Buttons */
.wp-block-buttons {
    flex-direction: column;
    width: 100%;
}

.wp-block-button {
    width: 100%;
}

.wp-block-button__link {
    width: 100%;
    padding: 14px 24px !important;
    font-size: 1rem !important;
}

/* Columns & Grid */
.wp-block-columns {
    flex-direction: column !important;
    gap: 1.5rem !important;
}

.wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
}

/* Category Cards */
.wp-block-column .wp-block-group {
    padding: 1.5rem !important;
}

/* Shop Products Grid */
.products-grid .wp-block-woocommerce-product-template {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
}

/* Product Cards */
.product-card {
    padding: 1rem !important;
}

.product-card .wp-block-post-title {
    font-size: 1.1rem !important;
}

.product-card .price {
    font-size: 1.25rem !important;
}

/* Shop Sidebar */
.shop-layout {
    flex-direction: column !important;
}

.shop-sidebar {
    width: 100% !important;
    position: static !important;
    order: 2;
}

.shop-content {
    width: 100% !important;
}

/* Single Product - Mobile */
.product-container {
	grid-template-columns: 1fr !important;
	gap: 1.5rem;
	padding: 1rem;
}

.single-product .product {
	padding: 1rem !important;
}

.product-gallery-section {
	margin-bottom: 1.5rem;
}

.single-product .product_title {
	font-size: 1.75rem !important;
}

.single-product .price {
	font-size: 1.5rem !important;
}

.single-product .woocommerce-product-details__short-description {
	padding: 1rem;
	font-size: 1rem;
}

.single-product .variations select {
	padding: 0.875rem 1rem !important;
	font-size: 0.95rem !important;
}

.single-product .single_add_to_cart_button {
	padding: 1rem 1.5rem !important;
	font-size: 1rem !important;
}/* Cart & Checkout */
.woocommerce-cart-form table {
    font-size: 0.9rem;
}

.woocommerce-cart-form .product-thumbnail {
    display: none;
}

.woocommerce-cart-form .product-name {
    font-size: 0.95rem;
}

.cart-collaterals {
    width: 100% !important;
}

.checkout-form {
    display: flex;
    flex-direction: column;
}

.checkout-form .col2-set {
    width: 100% !important;
}

.checkout-form #order_review {
    width: 100% !important;
    margin-top: 2rem;
}

/* Blog Cards */
.wp-block-query .wp-block-post-template {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
}

.blog-card {
    margin-bottom: 1.5rem;
}

.blog-card .wp-block-post-title {
    font-size: 1.35rem !important;
}

/* Single Post */
.single-post .entry-content {
    padding: 1rem;
    font-size: 1rem;
}

.single-post .wp-block-post-featured-image {
    margin-bottom: 1.5rem;
}

/* Footer */
.site-footer .wp-block-columns {
    flex-direction: column;
}

.site-footer .wp-block-column {
    margin-bottom: 2rem;
}

/* Spacing Adjustments */
.wp-block-group {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

section[style*="padding"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Hide desktop-only elements */
.desktop-only {
    display: none !important;
}

.mobile-only {
    display: block !important;
}

/* ===============================================
   TABLET (768px - 1023px)
   =============================================== */
@media (min-width: 768px) {
    
    /* Hero */
    .hero-section {
        min-height: 500px !important;
        padding: 4rem 2rem !important;
    }
    
    .hero-section .wp-block-heading {
        font-size: 3rem !important;
    }
    
    .hero-section .has-large-font-size {
        font-size: 1.25rem !important;
    }
    
    /* Buttons */
    .wp-block-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .wp-block-button {
        width: auto;
    }
    
    /* Columns - 2 columns on tablet */
    .wp-block-columns {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    
    .wp-block-column {
        flex-basis: calc(50% - 1rem) !important;
        width: calc(50% - 1rem) !important;
    }
    
    /* Shop Products - 2 columns */
    .products-grid .wp-block-woocommerce-product-template {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Blog - 2 columns */
    .wp-block-query .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    
	/* Single Product - Tablet */
	.product-container {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}
	
	.single-product .product_title {
		font-size: 2rem !important;
	}
	
	.single-product .price {
		font-size: 1.75rem !important;
	}
	
	/* Cart */
	.woocommerce-cart-form .product-thumbnail {
		display: table-cell;
	}    /* Checkout - Still single column */
    .checkout-form {
        flex-direction: column;
    }
    
    /* Spacing */
    .wp-block-group {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    section[style*="padding"] {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* ===============================================
   TABLET LANDSCAPE (1024px - 1279px)
   =============================================== */
@media (min-width: 1024px) {
    
    /* Hero */
    .hero-section {
        min-height: 600px !important;
        padding: 6rem 3rem !important;
    }
    
    .hero-section .wp-block-heading {
        font-size: 3.5rem !important;
    }
    
    /* Columns - 4 columns on desktop */
    .wp-block-columns.alignwide .wp-block-column {
        flex-basis: calc(25% - 1.5rem) !important;
        width: calc(25% - 1.5rem) !important;
    }
    
    /* 3 columns for standard columns */
    .wp-block-columns:not(.alignwide) .wp-block-column {
        flex-basis: calc(33.333% - 1.5rem) !important;
        width: calc(33.333% - 1.5rem) !important;
    }
    
    /* Shop Products - 3 columns */
    .products-grid .wp-block-woocommerce-product-template {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }
    
    /* Shop with Sidebar */
    .shop-layout {
        flex-direction: row !important;
        gap: 2rem;
    }
    
    .shop-sidebar {
        width: 280px !important;
        position: sticky !important;
        top: 100px;
        height: fit-content;
    }
    
    .shop-content {
        flex: 1;
    }
    
    /* Blog - 3 columns */
    .wp-block-query .wp-block-post-template {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }
    
	/* Single Product - Desktop 2 columns */
	.product-container {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}
	
	.single-product .product {
		padding: 2rem;
	}
	
	.single-product .product_title {
		font-size: 2.5rem !important;
	}
	
	.single-product .price {
		font-size: 2rem !important;
	}    /* Checkout - 2 columns */
    .checkout-form {
        flex-direction: row;
        gap: 3rem;
    }
    
    .checkout-form .col2-set {
        width: 60% !important;
    }
    
    .checkout-form #order_review {
        width: 40% !important;
        margin-top: 0;
    }
    
    /* Footer - 4 columns */
    .site-footer .wp-block-columns {
        flex-direction: row;
    }
    
    .site-footer .wp-block-column {
        flex-basis: 25% !important;
    }
    
    /* Spacing */
    .wp-block-group {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
    
    /* Show desktop elements */
    .desktop-only {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* ===============================================
   LARGE DESKTOP (1280px+)
   =============================================== */
@media (min-width: 1280px) {
    
    /* Container max-width */
    .wp-block-group.alignwide,
    .alignwide {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .wp-block-group.alignfull {
        max-width: 100%;
    }
    
    /* Shop Products - 4 columns on large screens */
    .products-grid .wp-block-woocommerce-product-template {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Hero */
    .hero-section .wp-block-heading {
        font-size: 4rem !important;
    }
}

/* ===============================================
   EXTRA LARGE DESKTOP (1920px+)
   =============================================== */
@media (min-width: 1920px) {
    
    .wp-block-group.alignwide {
        max-width: 1400px;
    }
    
    /* Shop Products - 5 columns on ultra-wide */
    .products-grid .wp-block-woocommerce-product-template {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* ===============================================
   TOUCH DEVICES
   =============================================== */
@media (hover: none) and (pointer: coarse) {
    
    /* Larger tap targets */
    .wp-block-button__link,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch */
    .hover-lift:hover {
        transform: none !important;
    }
    
    .product-card:hover {
        transform: none !important;
    }
    
    /* Disable parallax on touch devices */
    .parallax {
        background-attachment: scroll !important;
    }
}

/* ===============================================
   LANDSCAPE ORIENTATION
   =============================================== */
@media (max-width: 1023px) and (orientation: landscape) {
    
    /* Reduce hero height in landscape */
    .hero-section {
        min-height: 350px !important;
        padding: 3rem 2rem !important;
    }
    
    /* Adjust font sizes */
    .hero-section .wp-block-heading {
        font-size: 2.5rem !important;
    }
}

/* ===============================================
   PRINT STYLES
   =============================================== */
@media print {
    
    /* Hide navigation, footer, etc. */
    header,
    footer,
    .shop-sidebar,
    .wp-block-buttons {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    .product-summary,
    .entry-content {
        max-width: 100%;
    }
}

/* ===============================================
   ACCESSIBILITY - HIGH CONTRAST
   =============================================== */
@media (prefers-contrast: high) {
    
    .product-card,
    .blog-card {
        border: 2px solid currentColor !important;
    }
    
    .wp-block-button__link {
        border: 2px solid currentColor;
    }
}

/* ===============================================
   REDUCED MOTION
   =============================================== */
@media (prefers-reduced-motion: reduce) {
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax {
        background-attachment: scroll !important;
    }
}
