/* Safety Section */
.safety-section {
    background-color: #f1f3f6;
    /* Light grey background as seen in image */
    padding: 20px 0;
    margin-bottom: 20px;
}

.safety-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.safety-title {
    font-size: 20px;
    font-weight: 600;
    color: #212121;
    margin: 0;
    text-transform: uppercase;
}

.view-all-btn {
    background-color: #d32f2f;
    /* Red/Pink color */
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 2px;
    /* Sharp or slightly rounded */
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.view-all-btn:hover {
    background-color: #b71c1c;
    color: #fff;
}

/* Content Container */
.safety-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Featured Grid (Brands + Categories) */
.safety-featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    /* 1 wide block, 4 narrower blocks */
    gap: 10px;
    margin-bottom: 20px;
}

/* Brands Card (The wide one) */
.brands-card {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.brands-title {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 20px;
}

.brands-logos {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    background: #fff;
}

.brand-circle img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.brand-name {
    font-size: 12px;
    color: #666;
}

/* Category Card (The blue ones) */
.safety-cat-card {
    background: linear-gradient(180deg, rgba(227, 242, 253, 0.5) 0%, rgba(187, 222, 251, 0.5) 100%);
    border-radius: 4px;
    padding: 15px;
    /* Consistent padding */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: transform 0.2s;
    height: 100%;
    /* Fill grid cell */
    min-height: 220px;
    /* Force visual height */
}

.safety-cat-card:hover {
    transform: translateY(-3px);
}

.safety-cat-image {
    width: 100%;
    height: 140px;
    /* Fixed height for image area */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.safety-cat-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* Helps blend white bg images if needed */
}

.safety-cat-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.safety-explore-link {
    font-size: 12px;
    color: #1976d2;
    /* Blue link color */
    text-decoration: none;
}

/* Products Row - Reuse styled from Bestsellers but scoped if needed */
/* We can reuse .bestsellers-container styles if we import that CSS, 
   but let's define specific ones here to be safe and independent */
.safety-products-container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 10px;
    gap: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.safety-products-container::-webkit-scrollbar {
    display: none;
}

/* Reuse Product Card Styles with .safety-product-card */
.safety-product-card {
    min-width: 200px;
    max-width: 200px;
    background: #fff;
    border-radius: 4px;
    padding: 15px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .safety-featured-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 columns on tablet */
        grid-template-rows: auto;
    }

    .brands-card {
        grid-column: span 2;
        /* Full width for brands */
    }
}

@media (max-width: 768px) {
    .safety-featured-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 10px;
        scrollbar-width: none;
        grid-template-columns: none;
        /* Reset grid */
    }

    .brands-card {
        min-width: 280px;
        /* Fixed width for horizontal scroll */
        grid-column: auto;
        flex-shrink: 0;
    }

    .safety-cat-card {
        min-width: 160px;
        flex-shrink: 0;
    }

    .safety-product-card {
        min-width: 150px;
        max-width: 150px;
        padding: 10px;
    }
}

/* Rating Badge Styling */
.rating-badge {
    background-color: #388e3c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: fit-content;
    /* Ensure it doesn't take full width */
    margin-bottom: 5px;
}

.rating-badge i {
    font-size: 10px;
}

/* Navigation Buttons */
.safety-scroll-wrapper {
    position: relative;
}

.safety-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
    outline: none;
    transition: background-color 0.2s;
    border-radius: 4px;
    /* Optional rounded */
}

.safety-nav-btn:hover {
    background-color: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.safety-nav-btn.prev-btn {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.safety-nav-btn.next-btn {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.safety-nav-btn i {
    font-size: 24px;
    color: #212121;
}

/* Hide on mobile/touch if preferred, or maintain for ease */
@media (max-width: 768px) {
    .safety-nav-btn {
        display: none;
        /* Usually hide arrows on mobile where touch scroll is natural */
    }
}