/* ================================================= */
/* CATEGORY PAGE – ULTRA MODERN & RESPONSIVE */
/* ================================================= */

:root {
    --cat-bg: #f8fafc;
    --cat-card-bg: #ffffff;
    --cat-text: #0f172a;
    --cat-text-light: #475569;
    --cat-text-lighter: #64748b;
    --cat-border: #e2e8f0;
    --cat-primary: #2563eb;
    --cat-primary-dark: #1d4ed8;
    --cat-primary-light: #3b82f6;
    --cat-success: #10b981;
    --cat-warning: #f59e0b;
    --cat-danger: #ef4444;
    --cat-radius: 24px;
    --cat-radius-sm: 16px;
    --cat-shadow: 0 20px 40px -12px rgba(0,0,0,0.1);
    --cat-shadow-hover: 0 30px 60px -12px rgba(37,99,235,0.25);
}

/* Page Container */
.category-page {
    background: var(--cat-bg);
    min-height: 100vh;
    padding: 2rem 0 4rem;
}

/* Breadcrumb */
.category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--cat-text-lighter);
    flex-wrap: wrap;
}

.category-breadcrumb a {
    color: var(--cat-text-lighter);
    text-decoration: none;
    transition: color 0.2s;
}

.category-breadcrumb a:hover {
    color: var(--cat-primary);
}

.category-breadcrumb i {
    font-size: 0.8rem;
}

.category-breadcrumb span {
    color: var(--cat-text);
    font-weight: 500;
}

/* Header Section */
.category-header {
    margin-bottom: 3rem;
    text-align: center;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgb(230, 38, 92);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--cat-primary), var(--cat-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-subtitle {
    font-size: 1.1rem;
    color: var(--cat-text-lighter);
    margin: 0;
}

/* ================================================= */
/* CATEGORIES GRID */
/* ================================================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Responsive Grid */
@media (min-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Category Card */
.category-card {
    height: 100%;
    background: var(--cat-card-bg);
    border-radius: var(--cat-radius);
    overflow: hidden;
    box-shadow: var(--cat-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--cat-border);
    position: relative;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--cat-shadow-hover);
    border-color: transparent;
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Image Wrapper */
.category-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f1f5f9;
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card:hover .category-image {
    transform: scale(1.1);
}

/* Overlay */
.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-view-btn {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 2rem;
    border: 2px solid white;
    border-radius: 50px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.category-card:hover .category-view-btn {
    transform: translateY(0);
}

/* Content */
.category-content {
    padding: 1.5rem;
    text-align: center;
}

.category-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cat-text);
    margin: 0 0 0.5rem;
    transition: color 0.3s;
}

.category-card:hover .category-name {
    color: var(--cat-primary);
}

.category-product-count {
    font-size: 0.9rem;
    color: var(--cat-text-lighter);
    background: #f1f5f9;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    display: inline-block;
}

/* Empty State */
.category-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--cat-radius);
    box-shadow: var(--cat-shadow);
}

.category-empty i {
    font-size: 4rem;
    color: var(--cat-text-lighter);
    margin-bottom: 1rem;
}

.category-empty h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cat-text);
    margin-bottom: 0.5rem;
}

.category-empty p {
    color: var(--cat-text-lighter);
}

/* ================================================= */
/* PROMO SECTION */
/* ================================================= */

.promo-section {
    margin: 4rem 0;
    padding: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--cat-radius);
    position: relative;
    overflow: hidden;
}

.promo-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.promo-inner {
    position: relative;
    z-index: 2;
}

.promo-header {
    text-align: center;
    margin-bottom: 3rem;
}

.promo-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    color: white;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.promo-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 1rem;
}

.promo-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* Promo Grid */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .promo-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Promo Card */
.promo-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--cat-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.promo-card:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,0.2);
}

.promo-card:hover::before {
    left: 100%;
}

.promo-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.promo-card:hover .promo-icon-wrapper {
    transform: scale(1.1);
    background: rgba(255,255,255,0.3);
}

.promo-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.promo-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.8rem;
}

.promo-card-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.promo-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.promo-card:hover .promo-card-link {
    opacity: 1;
    transform: translateY(0);
}

.promo-card-link i {
    transition: transform 0.2s;
}

.promo-card-link:hover i {
    transform: translateX(5px);
}

/* ================================================= */
/* NEWSLETTER SECTION - FIXED */
/* ================================================= */

.newsletter-section {
    margin: 4rem 0;
    padding: 3rem;
    background: white;
    border-radius: var(--cat-radius);
    box-shadow: var(--cat-shadow);
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cat-text);
    margin: 0 0 1rem;
    background: linear-gradient(135deg, var(--cat-primary), var(--cat-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-content p {
    font-size: 1rem;
    color: var(--cat-text-lighter);
    margin: 0 0 2rem;
    line-height: 1.6;
}

/* ================================================= */
/* NEWSLETTER FORM - FIXED */
/* ================================================= */

.newsletter-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    background: white;
    border: 2px solid var(--cat-border);
    border-radius: 60px;
    padding: 0.3rem;
    transition: all 0.3s ease;
}

.newsletter-input-group:focus-within {
    border-color: var(--cat-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.newsletter-input-group input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 60px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.newsletter-input-group input::placeholder {
    color: #94a3b8;
}

.newsletter-input-group button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--cat-primary), var(--cat-primary-dark));
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-input-group button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.newsletter-input-group button i {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.newsletter-input-group button:hover i {
    transform: translateX(5px);
}

/* ================================================= */
/* RESPONSIVE NEWSLETTER */
/* ================================================= */

@media (max-width: 768px) {
    .newsletter-section {
        margin: 3rem 0;
        padding: 2rem 1.5rem;
    }

    .newsletter-content h2 {
        font-size: 1.8rem;
    }

    .newsletter-input-group {
        flex-direction: column;
        gap: 1rem;
        border: none;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .newsletter-input-group:focus-within {
        border: none;
        box-shadow: none;
    }

    .newsletter-input-group input {
        width: 100%;
        padding: 1rem 1.5rem;
        border: 2px solid var(--cat-border);
        background: white;
    }

    .newsletter-input-group button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .newsletter-section {
        margin: 2rem 0;
        padding: 1.5rem 1rem;
    }

    .newsletter-content h2 {
        font-size: 1.5rem;
    }

    .newsletter-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .newsletter-input-group input {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    .newsletter-input-group button {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .newsletter-content h2 {
        font-size: 1.3rem;
    }

    .newsletter-input-group button span {
        font-size: 0.9rem;
    }

    .newsletter-input-group button i {
        font-size: 1rem;
    }
}

/* ================================================= */
/* RESPONSIVE STYLES */
/* ================================================= */

@media (max-width: 992px) {
    .category-title {
        font-size: 2rem;
    }

    .promo-section {
        padding: 2rem;
    }

    .promo-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .category-page {
        padding: 1.5rem 0 3rem;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .category-subtitle {
        font-size: 1rem;
    }

    .promo-section {
        padding: 2rem 1rem;
    }

    .promo-title {
        font-size: 1.5rem;
    }

    .promo-desc {
        font-size: 1rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .category-title {
        font-size: 1.5rem;
    }

    .category-header {
        margin-bottom: 2rem;
    }

    .category-grid {
        gap: 1.5rem;
    }

    .category-content {
        padding: 1.2rem;
    }

    .category-name {
        font-size: 1.1rem;
    }

    .promo-card {
        padding: 1.5rem 1rem;
    }

    .promo-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .promo-icon {
        font-size: 2rem;
    }

    .newsletter-section {
        padding: 2rem 1rem;
    }

    .newsletter-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .category-breadcrumb {
        font-size: 0.8rem;
    }

    .category-product-count {
        font-size: 0.8rem;
    }

    .promo-card-title {
        font-size: 1.1rem;
    }

    .promo-card-desc {
        font-size: 0.85rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card {
    animation: fadeInUp 0.6s ease backwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.category-card:nth-child(7) { animation-delay: 0.7s; }
.category-card:nth-child(8) { animation-delay: 0.8s; }