* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

/* Header Styles */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ast-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.ast-primary-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-branding img {
    height: 60px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}
/* Success message */
.message.success {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Info message */
.message.info {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #cce5ff;
    color: #004085;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Error message */
.message.error {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #007cba;
}

.cart-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.add-to-cart-btn {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #005a87;
}
.cart-container:hover {
    background: #f9f9f9;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Main Content Layout */
.site-content {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.widget-area {
    flex: 0 0 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.content-area {
    flex: 1;
    min-width: 0;
}

/* Sidebar Styles */
.widget {
    padding: 25px;
}

.sidebar-close {
    display: none;
}

.widget-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.product-categories {
    list-style: none;
}

.product-categories li {
    margin-bottom: 8px;
}

.product-categories a {
    text-decoration: none;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.product-categories a:hover {
    color: #007cba;
    background: #f0f8ff;
}

.count {
    background: #007cba;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Shop Toolbar */
.ast-shop-toolbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.woocommerce-result-count {
    margin: 0;
    color: #666;
    font-weight: 500;
}

.woocommerce-ordering select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

/* Product Grid - Key Changes Here */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(201px, 1fr));
    gap: 24px;
    list-style: none;
    margin-bottom: 40px;
}

/* Responsive grid adjustments */
@media (min-width: 1200px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1600px) {
    .products {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
}

.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.astra-shop-thumbnail-wrap {
    position: relative;
    overflow: hidden;
    height: 220px; /* Fixed height for consistent layout */
    background: #f8f9fa;
}

.astra-shop-thumbnail-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    padding: 15px; /* Added spacing around image */
    box-sizing: border-box;
}

.product:hover .astra-shop-thumbnail-wrap img {
    transform: scale(1.05);
}

.ast-quick-view-text {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,124,186,0.9);
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product:hover .ast-quick-view-text {
    opacity: 1;
}

.astra-shop-summary-wrap {
    padding: 20px;
}

.ast-woo-product-category {
    color: #007cba;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
    font-weight: 600;
}

.woocommerce-loop-product__title {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.woocommerce-loop-product__title a {
    text-decoration: none;
    color: #333;
}

.woocommerce-loop-product__title a:hover {
    color: #007cba;
}

/* Removed star rating styles */

.price {
    font-size: 20px;
    font-weight: bold;
    color: #007cba;
}

/* Pagination */
.woocommerce-pagination {
    text-align: center;
    margin-top: 40px;
}

.page-numbers {
    display: inline-flex;
    list-style: none;
    gap: 8px;
}

.page-numbers li {
    display: inline;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.page-numbers .current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.page-numbers a:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.site-below-footer-inner-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer p {
    margin: 0;
}

/* Filter Button */
.astra-shop-filter-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.astra-shop-filter-button:hover {
    background: #005a87;
}

@media (min-width: 769px) {
    .astra-shop-filter-button {
        display: none;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .site-content {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .widget-area {
        flex: none;
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        z-index: 1001;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 20px rgba(0,0,0,0.2);
    }

    .widget-area.active {
        left: 0;
    }

    .content-area {
        width: 100%;
    }

    .products {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }

    /* For slightly wider mobile/tablet views (e.g., 600px and up), aim for 3 columns */
    @media (min-width: 550px) { /* Adjust this breakpoint as needed for your design */
        .products {
            grid-template-columns: repeat(3, 1fr); /* Explicitly set to 3 columns */
        }
    }

    .ast-shop-toolbar-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .site-below-footer-inner-wrap {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .astra-shop-filter-button {
        display: flex;
    }

    /* Mobile overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Close button for mobile sidebar */
    .sidebar-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #666;
        z-index: 1002;
    }

    .sidebar-close:hover {
        color: #333;
    }
}

@media (max-width: 480px) {
    .ast-container {
        padding: 0 15px;
    }

    .site-content {
        padding: 15px;
    }
}
