/* ================================================================
   PRODUCT CATEGORIES SECTION
   Elegant grid showcase of product sub-categories
   ================================================================ */

.product-categories-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle decorative background */
.product-categories-section::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 201, 80, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.product-categories-section::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(224, 25, 30, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* Section Header */
.pc-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.pc-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(2, 6, 24, 0.05);
    border: 1px solid rgba(2, 6, 24, 0.1);
    border-radius: 50px;
    color: var(--main-dark-blue);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.pc-header-badge i {
    color: var(--main-green);
}

.pc-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--main-dark-blue);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.pc-subtitle {
    font-size: 1.05rem;
    color: #64748b;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================================
   GRID LAYOUT
   ================================================================ */
.pc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Center the last card when it's alone in a row */
.pc-grid > .pc-card:last-child:nth-child(3n+1) {
    grid-column: 2 / 3;
}

/* ================================================================
   CATEGORY CARD
   ================================================================ */
.pc-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    box-shadow: 0 2px 8px rgba(2, 6, 24, 0.04);
    opacity: 0;
    transform: translateY(20px);
    animation: pcFadeInUp 0.6s ease forwards;
}

.pc-card:nth-child(1) { animation-delay: 0.05s; }
.pc-card:nth-child(2) { animation-delay: 0.1s; }
.pc-card:nth-child(3) { animation-delay: 0.15s; }
.pc-card:nth-child(4) { animation-delay: 0.2s; }
.pc-card:nth-child(5) { animation-delay: 0.25s; }
.pc-card:nth-child(6) { animation-delay: 0.3s; }
.pc-card:nth-child(7) { animation-delay: 0.35s; }

@keyframes pcFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(2, 6, 24, 0.12);
}

/* Parent category color borders on hover */
.pc-card[data-parent-color="green"]:hover {
    border-color: var(--main-green);
    box-shadow: 0 20px 40px rgba(0, 201, 80, 0.15);
}

.pc-card[data-parent-color="red"]:hover {
    border-color: var(--main-red);
    box-shadow: 0 20px 40px rgba(224, 25, 30, 0.15);
}

.pc-card[data-parent-color="blue"]:hover {
    border-color: #3b82f6;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

/* ================================================================
   CARD IMAGE
   ================================================================ */
.pc-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f1f5f9;
}

.pc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pc-card:hover .pc-card-image img {
    transform: scale(1.08);
}

/* Gradient overlay for text readability */
.pc-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(2, 6, 24, 0.7) 100%
    );
    pointer-events: none;
}

/* Parent category badge (top-left) */
.pc-parent-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.pc-parent-badge i {
    font-size: 0.85rem;
}

/* Color variants for parent badge */
.pc-parent-badge.green {
    color: var(--main-green);
    border: 1px solid rgba(0, 201, 80, 0.2);
}

.pc-parent-badge.red {
    color: var(--main-red);
    border: 1px solid rgba(224, 25, 30, 0.2);
}

.pc-parent-badge.blue {
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.pc-card:hover .pc-parent-badge {
    transform: translateY(-2px);
}

/* Item count badge (top-right) */
.pc-count-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(2, 6, 24, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

/* ================================================================
   CARD CONTENT
   ================================================================ */
.pc-card-content {
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pc-card-text {
    flex: 1;
    min-width: 0;
}

.pc-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--main-dark-blue);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.pc-card-description {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Arrow indicator */
.pc-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-dark-blue);
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.pc-card:hover .pc-card-arrow {
    transform: translateX(4px);
}

/* Arrow color on hover based on parent category */
.pc-card[data-parent-color="green"]:hover .pc-card-arrow {
    background: var(--main-green);
    color: #ffffff;
}

.pc-card[data-parent-color="red"]:hover .pc-card-arrow {
    background: var(--main-red);
    color: #ffffff;
}

.pc-card[data-parent-color="blue"]:hover .pc-card-arrow {
    background: #3b82f6;
    color: #ffffff;
}

/* Bottom accent line */
.pc-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--main-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: 2;
}

.pc-card[data-parent-color="red"]::before {
    background: var(--main-red);
}

.pc-card[data-parent-color="blue"]::before {
    background: #3b82f6;
}

.pc-card:hover::before {
    transform: scaleX(1);
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

/* Tablet */
@media (max-width: 991.98px) {
    .product-categories-section {
        padding: 3.5rem 0;
    }
    
    .pc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    /* Reset centering for 2-column layout */
    .pc-grid > .pc-card:last-child:nth-child(3n+1) {
        grid-column: auto;
    }
    
    .pc-grid > .pc-card:last-child:nth-child(2n+1) {
        grid-column: 1 / 2;
    }
    
    .pc-title {
        font-size: 2rem;
    }
    
    .pc-header {
        margin-bottom: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .product-categories-section {
        padding: 2.5rem 0;
    }
    
    .pc-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Reset centering for single column */
    .pc-grid > .pc-card:last-child:nth-child(2n+1) {
        grid-column: auto;
    }
    
    .pc-title {
        font-size: 1.75rem;
    }
    
    .pc-subtitle {
        font-size: 0.95rem;
    }
    
    .pc-header {
        margin-bottom: 2rem;
    }
    
    .pc-card-content {
        padding: 1rem;
    }
    
    .pc-card-title {
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .pc-title {
        font-size: 1.5rem;
    }
    
    .pc-card-image {
        aspect-ratio: 16 / 9;
    }
}