/**
 * Aggressive Compact Layout - Removes Storefront Theme Spacing
 */

/* Kill all Storefront padding/margins */
.storefront-full-width-content .content-area,
.storefront-full-width-content .widget-area {
    margin: 0 !important;
    padding: 0 !important;
}

.site-header {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.col-full {
    padding: 0 15px !important;
    margin: 0 auto !important;
}

#masthead {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.site-branding {
    margin-bottom: 0 !important;
    padding: 10px 0 !important;
}

.site-header .col-full {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Remove page header spacing */
.woocommerce-products-header {
    display: none !important;
}

/* Main content area */
#main {
    margin: 0 !important;
    padding: 0 !important;
}

#primary {
    margin: 0 !important;
    padding: 0 !important;
}

#content {
    padding: 0 !important;
    margin: 0 !important;
}

.content-area {
    margin: 0 !important;
    padding: 0 !important;
}

.site-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Hero section more compact */
.shop-hero {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding: 30px 0 !important;
}

.shop-hero h1 {
    font-size: 2rem !important;
    margin: 0 0 10px 0 !important;
}

.shop-hero p {
    margin: 0 0 15px 0 !important;
    font-size: 1rem !important;
}

.hero-stats {
    margin-top: 20px !important;
}

/* Features section */
.shop-features {
    padding: 20px 0 !important;
    margin-bottom: 20px !important;
}

.features-grid {
    gap: 10px !important;
}

.feature {
    padding: 15px 10px !important;
}

.feature-icon {
    font-size: 1.5rem !important;
    margin-bottom: 5px !important;
}

.feature h3 {
    font-size: 0.9rem !important;
    margin-bottom: 3px !important;
}

.feature p {
    font-size: 0.8rem !important;
    margin: 0 !important;
}

/* Filter bar */
.shop-header-bar,
.shop-filters-premium {
    padding: 10px 0 !important;
    margin-bottom: 15px !important;
}

.shop-filters-premium {
    padding: 10px !important;
}

/* Product grid super compact */
ul.products {
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 10px !important;
}

ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
}

/* Product cards */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
    aspect-ratio: 3/4 !important;
}

.product-info {
    padding: 10px !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce ul.products li.product h3,
.woocommerce ul.products li.product h2 {
    font-size: 0.9rem !important;
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.star-rating {
    font-size: 0.8rem !important;
    margin: 0 0 5px 0 !important;
}

.woocommerce ul.products li.product .price {
    font-size: 1.1rem !important;
    margin: 0 0 8px 0 !important;
}

.woocommerce ul.products li.product .button {
    margin: 0 !important;
    padding: 8px 15px !important;
    font-size: 0.8rem !important;
}

/* Remove Storefront's responsive columns */
@media (min-width: 768px) {
    .storefront-product-section ul.products li.product,
    .site-main ul.products li.product {
        width: auto !important;
        float: none !important;
        clear: none !important;
    }
}

/* Footer */
.site-footer {
    margin-top: 30px !important;
    padding: 30px 0 15px !important;
}

.site-footer::before {
    display: none !important;
}

/* Kill all the before/after spacing */
.site-header::before,
.site-header::after,
.site-footer::before,
.site-footer::after,
.col-full::before,
.col-full::after {
    display: none !important;
}

/* Remove storefront breadcrumb padding */
.storefront-breadcrumb {
    margin: 0 !important;
    padding: 5px 0 !important;
}

/* Cart and checkout pages */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    margin: 20px auto !important;
}

/* Promotional banner */
body::before {
    padding: 5px !important;
    font-size: 0.75rem !important;
    margin: 0 !important;
}

/* Remove all section margins */
section {
    margin: 0 !important;
    padding: 0 !important;
}

/* Product categories */
.product-categories {
    margin: 0 0 5px 0 !important;
}

.category-pill {
    padding: 2px 8px !important;
    font-size: 0.7rem !important;
}

/* Quick actions overlay */
.product-overlay {
    padding: 10px !important;
}

/* Ensure no double margins */
* + * {
    margin-top: 0;
}

/* Remove entry header */
.entry-header {
    display: none !important;
}

/* Navigation */
.main-navigation {
    clear: both;
    margin: 0 !important;
}

.main-navigation ul {
    margin: 0 !important;
    padding: 0 !important;
}

.main-navigation a {
    padding: 10px 15px !important;
}

/* Search widget */
.site-header .widget_product_search {
    margin: 0 !important;
}

/* Secondary navigation */
.secondary-navigation {
    margin: 0 !important;
}

/* Remove page margins */
.page-template-template-fullwidth-php .content-area {
    margin: 0 !important;
}

/* Trust badges */
.trust-badges {
    margin: 15px 0 !important;
    padding: 10px !important;
}

/* Single product */
.single-product div.product {
    margin: 20px 0 !important;
}

/* Related products */
.related.products {
    margin-top: 30px !important;
}

/* Messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    margin: 0 0 10px 0 !important;
    padding: 8px 12px !important;
}

/* Form fields */
.woocommerce form .form-row {
    margin-bottom: 10px !important;
}

/* Mobile */
@media (max-width: 768px) {
    ul.products {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 8px !important;
    }
    
    .shop-hero {
        padding: 20px 0 !important;
    }
    
    .shop-hero h1 {
        font-size: 1.5rem !important;
    }
    
    .col-full {
        padding: 0 10px !important;
    }
}