/* Galería de Plantas - Estilos Específicos */

/* Hero Section de Galería - Diseño Profesional y Elegante */
.gallery-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(
        180deg,
        rgba(248, 250, 252, 0.98) 0%,
        rgba(241, 245, 249, 0.95) 30%,
        rgba(236, 241, 247, 0.92) 60%,
        rgba(230, 237, 243, 0.95) 100%
    );
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    backdrop-filter: blur(1px);
    animation: subtleBreathing 8s ease-in-out infinite alternate;
    contain: layout style paint;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    background-size: 100% 100%, 100% 100%;
    animation: gentleGlow 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}

.gallery-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 48%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 52%
    );
    background-size: 100% 100%;
    animation: subtleShimmer 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
}

.gallery-hero .hero-content {
    text-align: center;
    color: rgba(55, 65, 81, 0.9);
    z-index: 3;
    position: relative;
    padding: clamp(3rem, 6vw, 5rem);
    border-radius: 12px;
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    max-width: min(700px, 85vw);
    margin: 0 auto;
    animation: gentleFadeIn 3s ease-out;
    will-change: transform, opacity;
    contain: layout style;
}

.gallery-hero .hero-content:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(255, 255, 255, 0.2) inset,
        0 4px 8px rgba(212, 175, 55, 0.4) inset,
        0 0 80px rgba(212, 175, 55, 0.2);
}

.gallery-hero h1 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: subtleTextReveal 2s ease-out 0.3s forwards;
    color: rgba(31, 41, 55, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.02em;
    line-height: 1.2;
    position: relative;
    z-index: 10;
}

.gallery-hero p {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    line-height: 1.7;
    margin: 0 auto 3rem auto;
    opacity: 0;
    transform: translateY(15px);
    animation: gentleTextFade 2.5s ease-out 0.8s forwards;
    color: rgba(75, 85, 99, 0.8);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.01em;
    max-width: 500px;
    position: relative;
    z-index: 10;
}

/* Partículas del Hero Mejoradas */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    transform: translateZ(0);
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(39, 174, 96, 0.6) 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(39, 174, 96, 0.3);
    animation: floatEnhanced 8s ease-in-out infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.hero-particles::before {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
    transform-origin: center;
}

.hero-particles::after {
    top: 70%;
    right: 20%;
    animation-delay: 4s;
    transform-origin: center;
}

/* Animaciones CSS Avanzadas */
@keyframes subtleBreathing {
    0% {
        transform: scale(1);
        opacity: 0.95;
    }
    50% {
        transform: scale(1.002);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.95;
    }
}

@keyframes gentleGlow {
    0% {
        opacity: 0.3;
        transform: translateY(0px);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-2px);
    }
    100% {
        opacity: 0.3;
        transform: translateY(0px);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatingLights {
    0% {
        background: 
            radial-gradient(circle at 20% 80%, rgba(120, 255, 214, 0.3) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(39, 174, 96, 0.4) 0%, transparent 50%);
    }
    100% {
        background: 
            radial-gradient(circle at 80% 20%, rgba(120, 255, 214, 0.4) 0%, transparent 60%),
            radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.3) 0%, transparent 60%),
            radial-gradient(circle at 60% 60%, rgba(39, 174, 96, 0.3) 0%, transparent 60%);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes luxuryTextShine {
    0%, 100% {
        background-position: 0% 50%;
        filter: brightness(1) contrast(1);
    }
    25% {
        background-position: 50% 0%;
        filter: brightness(1.1) contrast(1.1);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.2) contrast(1.2);
    }
    75% {
        background-position: 50% 100%;
        filter: brightness(1.1) contrast(1.1);
    }
}

@keyframes subtleShimmer {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes gentleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes subtleTextReveal {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleTextFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatEnhanced {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) translateX(-15px) scale(0.8);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-30px) translateX(5px) scale(1.1);
        opacity: 0.9;
    }
}

/* Sección de Filtros */
.filters-section {
    padding: 3rem 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.search-bar input {
    padding: 0.75rem 1.5rem;
    border: 2px solid #27ae60;
    border-radius: 25px;
    font-size: 1rem;
    width: 300px;
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
    transform: scale(1.02);
}

.search-btn {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #27ae60;
    background: transparent;
    color: #27ae60;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Grid de Plantas */
.gallery-main {
    padding: 4rem 0;
    background: white;
}

.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Cards de Plantas */
.plant-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.plant-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(39, 174, 96, 0.2);
}

.plant-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.plant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.plant-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(39, 174, 96, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.view-details {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #27ae60;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.plant-card:hover .view-details {
    transform: translateY(0);
}

.view-details:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

/* Información de la Planta */
.plant-info {
    padding: 1.5rem;
}

.plant-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.plant-category {
    color: #27ae60;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.care-level {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.care-level span {
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.care-level .easy {
    background: #d5f4e6;
    color: #27ae60;
}

.care-level .medium {
    background: #fef9e7;
    color: #f39c12;
}

.care-level .hard {
    background: #fadbd8;
    color: #e74c3c;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 1rem;
}

.add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #16a085 100%);
    color: white;
    border-color: #27ae60;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #1abc9c 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.add-to-cart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.add-to-cart:hover::before {
    left: 0;
}

.add-to-cart:hover::after {
    width: 200px;
    height: 200px;
}

.add-to-cart:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(39, 174, 96, 0.4), 0 0 20px rgba(39, 174, 96, 0.2);
    color: white;
    text-decoration: none;
    border-color: #2ecc71;
}

.add-to-cart:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
}

.modal-body {
    display: flex;
    min-height: 350px;
    flex-direction: column;
}

.modal-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.modal-info h2 {
    color: #2c3e50;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
}

.modal-info p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    text-align: justify;
}

.modal-details {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-details p {
    padding: 0.75rem;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
    border-left: 4px solid #2ecc71;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    margin-bottom: 0.5rem;
    color: #7f8c8d;
}

.modal-details strong {
    color: #2c3e50;
    font-weight: 600;
    display: inline-block;
    min-width: 80px;
}

.modal-price {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    color: #e74c3c;
    margin: 1rem 0;
    text-align: center;
}

.modal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 3px solid transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    user-select: none;
    z-index: 10;
    width: 100%;
    margin-top: 1rem;
    min-height: 50px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #16a085 100%);
    color: white;
    border-color: #27ae60;
}

.modal-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #1abc9c 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.modal-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.modal-button:hover {
    transform: translateY(-5px) scale(1.08) rotateX(5deg);
    box-shadow: 0 20px 50px rgba(39, 174, 96, 0.5), 0 0 30px rgba(39, 174, 96, 0.3);
    color: white;
    text-decoration: none;
    border-color: #2ecc71;
}

.modal-button:hover::before {
    left: 0;
}

.modal-button:hover::after {
    width: 300px;
    height: 300px;
}

.modal-button:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s ease;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover {
    background: rgba(231, 76, 60, 0.8);
    transform: scale(1.1);
}

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

@keyframes premiumPulse {
    0%, 100% {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 2px 4px rgba(212, 175, 55, 0.3) inset;
    }
    50% {
        box-shadow: 
            0 30px 60px rgba(0, 0, 0, 0.5),
            0 0 0 2px rgba(255, 255, 255, 0.15) inset,
            0 4px 8px rgba(212, 175, 55, 0.4) inset,
            0 0 30px rgba(212, 175, 55, 0.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Optimizaciones de rendimiento y responsividad */
@media (max-width: 768px) {
    .gallery-hero {
        height: 100vh;
        min-height: 500px;
        background-size: 400% 400%, 300% 300%, 250% 250%, 200% 200%, 150% 150%, 100% 100%;
    }
    
    .gallery-hero .hero-content {
        padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
        border-radius: 20px;
        max-width: 95vw;
    }
    
    .gallery-hero h1 {
        font-size: clamp(2rem, 6vw, 3rem);
        letter-spacing: 1px;
        line-height: 1.2;
    }
    
    .gallery-hero p {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        min-height: 450px;
        background-size: 300% 300%, 250% 250%, 200% 200%, 150% 150%, 100% 100%, 100% 100%;
    }
    
    .gallery-hero .hero-content {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }
    
    .gallery-hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        letter-spacing: 0.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-hero,
    .gallery-hero::before,
    .gallery-hero::after,
    .gallery-hero .hero-content,
    .gallery-hero h1,
    .gallery-hero p {
        animation: none !important;
        transition: none !important;
    }
    
    .gallery-hero .hero-content:hover {
        transform: none !important;
    }
}

@media (min-width: 1200px) {
    .gallery-hero .hero-content {
        max-width: 900px;
        padding: 4rem 3rem;
    }
    
    .gallery-hero h1 {
        font-size: clamp(3rem, 4vw, 5rem);
    }
    
    .gallery-hero p {
        font-size: clamp(1.1rem, 2vw, 1.4rem);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Efectos de filtro */
.plant-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.3s ease;
}

.plant-card.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 60px 20px;
    }
    
    .gallery-hero h1 {
        font-size: 2.5rem;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .plants-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 0 20px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .modal-body {
        flex-direction: column;
        min-height: auto;
    }
    
    .modal-image {
        height: 200px;
        border-radius: 15px 15px 0 0;
    }
    
    .modal-info {
        padding: 1.25rem;
        gap: 0.75rem;
    }
    
    .modal-info h2 {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        margin-bottom: 0.5rem;
    }
    
    .modal-info p {
        font-size: clamp(0.85rem, 3vw, 0.95rem);
        line-height: 1.4;
    }
    
    .plant-details div {
        padding: 0.6rem;
        font-size: clamp(0.8rem, 2.8vw, 0.9rem);
    }
    
    .plant-details strong {
        min-width: 70px;
        font-size: clamp(0.8rem, 2.8vw, 0.9rem);
    }
    
    .modal-price {
        font-size: clamp(1.3rem, 6vw, 1.6rem);
        margin: 0.75rem 0;
    }
    
    .modal-button {
        padding: 0.9rem 1.5rem;
        font-size: clamp(0.9rem, 3.5vw, 1rem);
        min-height: 45px;
        margin-top: 0.75rem;
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        color: white;
        border: none;
        border-radius: 50px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 1px;
        box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        position: relative;
    }
    
    .modal-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
        background: linear-gradient(135deg, #27ae60, #229954);
    }
    
    .close {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 10px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 2rem;
    }
    
    .plants-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .plant-card {
        max-width: none;
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .modal-image {
        height: 180px;
        border-radius: 0;
    }
    
    .modal-info {
        padding: 1rem;
        gap: 0.6rem;
        flex: 1;
        overflow-y: auto;
    }
    
    .modal-info h2 {
        font-size: clamp(1.2rem, 6vw, 1.4rem);
        line-height: 1.1;
    }
    
    .modal-info p {
        font-size: clamp(0.8rem, 3.5vw, 0.9rem);
        line-height: 1.3;
        text-align: left;
    }
    
    .plant-details {
        gap: 0.4rem;
    }
    
    .plant-details div {
        padding: 0.5rem;
        font-size: clamp(0.75rem, 3.2vw, 0.85rem);
    }
    
    .plant-details strong {
        min-width: 60px;
        font-size: clamp(0.75rem, 3.2vw, 0.85rem);
    }
    
    .modal-price {
        font-size: clamp(1.2rem, 7vw, 1.4rem);
        margin: 0.5rem 0;
    }
    
    .modal-button {
        padding: 0.8rem 1rem;
        font-size: clamp(0.85rem, 4vw, 0.95rem);
        min-height: 40px;
        margin-top: 0.5rem;
        position: sticky;
        bottom: 0;
        border-radius: 0;
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        color: white;
        border: none;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 1px;
        box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
    
    .modal-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
        background: linear-gradient(135deg, #27ae60, #229954);
    }
    
    .close {
        width: 30px;
        height: 30px;
        font-size: 20px;
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.7);
    }
}