* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.all {
    margin-top: 50px;
}

#pro-nav {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 10px auto;
    width: 80%;
}

#pro-nav a {
    text-decoration: none;
    color: #6a3aff;
}

.catcont {
    width: 80%;
    margin: 30px auto; /* Increased margin for better separation */
    background-color: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.05); /* Softer shadow */
    border-radius: 15px;
    padding: 50px;
}

.morepro {
    grid-column: 1 / span 2 ;
    align-items: center;
}

.header2 {
    text-align: center;
    margin-bottom: 40px;
}

.header-subtitle {
    color: #888;
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.header-title {
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
}

.carouse {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

/* NAVIGATION ARROWS */
.nav-button {
    width: 45px; /* Smaller, smarter buttons */
    height: 45px;
    padding: 12px;
    border-radius: 50%;
    margin: 0 10px;
    background: #f5f5f5; /* Subtle background */
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-button:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

/* --- GRID LOGIC SWAP START --- */

/* 1. Categories Grid (Now the SCROLLING one) */
.categories-grid {
    display: flex;
    flex-wrap: nowrap; /* Forces single line */
    overflow-x: auto;
    gap: 20px; /* Exact spacing requested */
    padding: 10px 5px; /* Padding for shadow clearance */
    scrollbar-width: none; /* Firefox hide scrollbar */
    -ms-overflow-style: none; /* IE hide scrollbar */
    scroll-behavior: smooth;
    width: 100%;
}

.categories-grid::-webkit-scrollbar {
    display: none; /* Chrome hide scrollbar */
}

.category-desc {
    font-size: 16px;
    color: #9c9c9c; /* Brand color accent */
    font-weight: 700;
    margin-top: 5px;
}

/* 2. Products Grid (Now the STATIONARY wrapping one) */
.products-grid {
    display: grid;
    /* This "smart" grid fills the row with as many 220px cards as fit */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px; /* Nice spacious gap */
    width: 100%;
    margin-bottom: 20px;
}

/* --- CARD STYLING --- */

.product-card {
    /* Fixed size for uniformity */
    width: 220px; 
    min-width: 220px; /* Critical for the scrolling flex container */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0; /* Subtle border looks cleaner */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    /* Ensure height is consistent if content varies */
    display: flex;
    flex-direction: column;
}

.inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 180px; /* Reduced height to match smaller width */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills box without stretching */
}

.product-image svg {
    width: 50px;
    height: 50px;
    opacity: 0.2;
}

.product-info {
    padding: 15px;
    flex-grow: 1; /* Pushes content to fill height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 15px;
    color: #222;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.3;
}

.description-text {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

.product-price {
    font-size: 16px;
    color: #6a3aff; /* Brand color accent */
    font-weight: 700;
    margin-top: 5px;
}

a {
    text-decoration: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .catcont {
        width: 95%;
        padding: 15px;
    }
    
    .products-grid {
        /* On mobile, allow 2 columns */
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }
    
    .product-card {
        width: 100%; /* In grid, fill the cell */
        min-width: 160px; /* For the scroll container */
    }
    
    .nav-button {
        display: none; /* Hide arrows on mobile, just swipe */
    }
}
