/* Section Container */
section {
    padding: 50px 0;
    background: linear-gradient(135deg, #f8f6f3 0%, #ffffff 50%, #faf9f7 100%);
    position: relative;
    overflow: hidden;
}

/* Add subtle background pattern */
section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(230, 175, 97, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 126, 91, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    position: relative;
    letter-spacing: 1px;
}

/* Add decorative line under title */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
    font-weight: 400;
    margin-top: 2rem;
}

/* Categories Grid Container */
.silk-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 80%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Enhanced Category Cards */
.category-item {
    background: #ffffff;
    border-radius: 20px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(230, 175, 97, 0.1);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out both;
}

/* Stagger animation delays for cards */
.category-item:nth-child(1) {
    animation-delay: 0.1s;
}

.category-item:nth-child(2) {
    animation-delay: 0.2s;
}

.category-item:nth-child(3) {
    animation-delay: 0.3s;
}

.category-item:nth-child(4) {
    animation-delay: 0.4s;
}

/* Image Container */
.category-image {
    position: relative;
    height: 150px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: brightness(0.9) saturate(1.1);
}

/* Image Overlay */
.category-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 175, 97, 0.1), rgba(168, 126, 91, 0.1));
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
}

/* Content Container */
.category-content {
    padding: 1rem;
    position: relative;
    z-index: 3;
}

/* Gradient overlay effect */
.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: all 0.4s ease;
    border-radius: 20px;
    z-index: 1;
}

/* Decorative corner element */
.category-item::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    opacity: 0.1;
    transition: all 0.4s ease;
    z-index: 2;
}

/* Hover Effects */
.category-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(230, 175, 97, 0.2);
    border-color: var(--primary-color);
}

.category-item:hover::before {
    opacity: 0.03;
}

.category-item:hover::after {
    opacity: 0.8;
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 0 20px rgba(230, 175, 97, 0.4);
}

.category-item:hover .category-image img {
    transform: scale(1.1);
    filter: brightness(1) saturate(1.2);
}

.category-item:hover .category-image::before {
    opacity: 1;
}

/* Content styling */
.category-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

.category-item:hover .category-title {
    color: var(--primary-color);
    transform: translateX(5px);
}

.category-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.category-item:hover .category-desc {
    color: #555;
    transform: translateX(5px);
}

/* Add subtle icons for each category */
.category-item:nth-child(1) .category-title::before {
    content: '◆';
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-size: 0.8em;
}

.category-item:nth-child(2) .category-title::before {
    content: '♦';
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-size: 0.8em;
}

.category-item:nth-child(3) .category-title::before {
    content: '✦';
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-size: 0.8em;
}

.category-item:nth-child(4) .category-title::before {
    content: '❋';
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-size: 0.8em;
}

/* Add floating elements for visual interest */
.silk-categories::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(230, 175, 97, 0.1), transparent 70%);
    border-radius: 50%;
    animation: gentleFloat 8s ease-in-out infinite;
    z-index: 1;
}

.silk-categories::after {
    content: '';
    position: absolute;
    bottom: 15%;
    left: 8%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(168, 126, 91, 0.1), transparent 70%);
    border-radius: 50%;
    animation: gentleFloat 6s ease-in-out infinite reverse;
    z-index: 1;
}

/* Trending glassmorphism effect */
@supports (backdrop-filter: blur(10px)) {
    .category-item {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* Image placeholder styling for demo */
.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1rem;
    text-align: center;
    position: relative;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    opacity: 0.3;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.6;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .silk-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-header {
        margin-bottom: 50px;
        padding: 0 1rem;
    }

    .silk-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .category-content {
        padding: 2rem 1.5rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .category-image {
        height: 200px;
    }
}

@media (max-width: 500px) {
    .section-header {
        margin-bottom: 15px;
        padding: 0 1rem;
    }
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle{
        font-size: 0.9rem;
    }

    .category-content {
        padding: 1rem;
    }

    .category-item:hover {
        transform: translateY(-5px) scale(1.01);
    }

    .category-image {
        height: 100px;
    }
     .silk-categories {
        gap: 1rem;
        padding: 0;
    }
    .category-content .btn-primary{
        font-size: 0.8rem;
    }
    .silk-categories{
        max-width: 95%;
    }
}