/* Image fade-in */
.promo-card img {
    transition: opacity 0.5s ease-in-out;
}
.promo-card img.loaded {
    opacity: 1;
}
/* Shake animation for search */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.shake {
    animation: shake 0.5s;
}
/* Navbar shrink */
.navbar-shrink {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
}
/* Tab click animation */
.tab-click {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.tab-btn {
    color: #F9FAFB !important;
}

.tab-btn:not([aria-pressed="true"]) {
    background-color: rgba(123,30,58, 0.2) !important;
}

.tab-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(30,144,255,0.5);
}
/* Category transition */
.grid-transition {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
}
.grid-visible {
    opacity: 1;
    transform: scale(1);
}
/* Custom fade-in animation for promo cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}
/* Blended promo card styles - uniform size and better image display */
.promo-card {
    background: rgba(10,25,47,0.6);
    border: 1px solid rgba(30,144,255, 0.2);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 350px;
    margin: 0 0.5rem;
}
.promo-card img {
    width: 100%;
    height: 220px;
    object-fit: scale-down;
    object-position: center;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    background: rgba(10,25,47,0.8);
}
.promo-card:hover img {
    transform: scale(1.05);
}
.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7B1E3A, #1E90FF, #C5A572);
}
.promo-card:hover {
    background: rgba(30,144,255,0.15);
    border-color: rgba(30,144,255, 0.5);
    box-shadow: 0 12px 40px rgba(30,144,255, 0.2), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-8px) scale(1.03);
}
.promo-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.promo-card h3 {
    color: #F9FAFB;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.promo-card p {
    color: rgba(249,250,251, 0.9);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.promo-card .price {
    color: #C5A572;
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}
.promo-card .expiration {
    color: rgba(249,250,251, 0.7);
    font-size: 0.875rem;
    margin-top: auto;
}
.promo-card .conditions {
    color: rgba(249,250,251, 0.6);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
/* Featured carousel */
.carousel {
    position: relative;
    overflow: hidden;
}
.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}
.carousel-item {
    min-width: 100%;
    opacity: 0.8;
    transition: opacity 0.5s ease;
    position: relative;
}
.carousel-item.active {
    opacity: 1;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #7B1E3A, #1E90FF);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.carousel-btn:hover {
    background: linear-gradient(135deg, #1E90FF, #7B1E3A);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(30,144,255,0.6);
    border-color: rgba(255,255,255,0.5);
}
.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}
.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-indicator:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.2);
}
.carousel-indicator.active {
    background: #1E90FF;
    transform: scale(1.2);
}
/* Category tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s;
    cursor: pointer;
}
.tab-btn.active {
    background: linear-gradient(135deg, #7B1E3A, #1E90FF);
    transform: scale(1.05);
}

/* Type tabs */
.type-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.type-btn {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s;
    cursor: pointer;
    background-color: rgba(123,30,58, 0.2);
    color: #F9FAFB;
    border: 1px solid rgba(30,144,255, 0.2);
}
.type-btn.active {
    background: linear-gradient(135deg, #1E90FF, #7B1E3A);
    transform: scale(1.05);
}
.type-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(30,144,255,0.5);
}
/* Expiring soon section */
.expiring-soon {
    background: linear-gradient(135deg, rgba(197,165,114,0.1), rgba(10,25,47,0.5));
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 0;
}
/* Newsletter */
.newsletter {
    background: rgba(10,25,47,0.8);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin: 3rem 0;
}
.newsletter input {
    padding: 1rem;
    border-radius: 50px;
    border: 1px solid rgba(30,144,255,0.5);
    background: rgba(255,255,255,0.1);
    color: #F9FAFB;
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
}
.newsletter button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #7B1E3A, #1E90FF);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}
.newsletter button:hover {
    transform: scale(1.05);
}
/* Hero gradient blend - integrated background */
.hero-gradient {
    background: linear-gradient(135deg, rgba(10,25,47,0.9), rgba(30,144,255,0.1), rgba(197,165,114,0.05));
    position: relative;
    overflow: hidden;
    border-radius: 0 0 50px 50px; /* Soft bottom corners to blend */
}
.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(30,144,255,0.1) 0%, transparent 70%),
                radial-gradient(ellipse at 20% 80%, rgba(123,30,58,0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(197,165,114,0.03) 0%, transparent 50%);
    animation: gradientShift 12s ease-in-out infinite alternate;
}
@keyframes gradientShift {
    0% { transform: translateX(-10px) translateY(-10px); }
    100% { transform: translateX(10px) translateY(10px); }
}
/* Floating particles */
.floating-particle {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}
.floating-particle:nth-child(1) { width: 20px; height: 20px; top: 20%; left: 10%; animation-delay: 0s; }
.floating-particle:nth-child(2) { width: 15px; height: 15px; top: 60%; left: 80%; animation-delay: 2s; }
.floating-particle:nth-child(3) { width: 25px; height: 25px; top: 40%; left: 60%; animation-delay: 4s; }
.floating-particle:nth-child(4) { width: 18px; height: 18px; top: 80%; left: 30%; animation-delay: 1s; }
.floating-particle:nth-child(5) { width: 12px; height: 12px; top: 30%; left: 90%; animation-delay: 3s; }
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.5; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}
/* Enhanced search container */
.search-container {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 0;
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 70%;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
}
.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    background: rgba(10,25,47,0.8);
    backdrop-filter: blur(40px);
    border: none;
    border-radius: 50px;
    color: #F9FAFB;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    box-shadow: none;
}
.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(30,144,255,0.3), 0 0 20px rgba(30,144,255,0.2);
    transform: scale(1.005);
}
.search-input::placeholder {
    color: rgba(229,231,235,0.7);
    transition: color 0.3s;
    text-shadow: none;
}
.search-input:focus::placeholder {
    color: rgba(229,231,235,0.5);
}
.search-icon {
    position: absolute;
    right: 2rem;
    color: rgba(30,144,255,0.9);
    font-size: 1.5rem;
    transition: all 0.3s;
    pointer-events: none;
}
.search-input:focus + .search-icon {
    color: #1E90FF;
    transform: scale(1.1);
}
.search-hint {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    color: rgba(197,165,114,0.9);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    text-align: center;
    width: 100%;
}
.search-container:hover .search-hint {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-input-wrapper {
        max-width: 98%;
        padding: 0 0.75rem;
    }
    .search-input {
        padding: 0.875rem 2.5rem 0.875rem 1.25rem;
        font-size: 1rem;
        border-radius: 40px;
    }
    .search-icon {
        right: 1.5rem;
        font-size: 1.25rem;
    }

    /* Promo cards mobile optimization */
    .promo-card {
        margin: 0 0 1rem 0;
        min-height: auto;
        padding: 0.75rem;
    }

    .promo-card img {
        height: 180px;
        margin-bottom: 0.75rem;
    }

    .promo-card h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .promo-card p {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .promo-card .price {
        font-size: 1rem;
    }

    .promo-card .expiration {
        font-size: 0.8rem;
    }

    .promo-card .conditions {
        font-size: 0.7rem;
    }

    /* Category and type tabs mobile */
    .category-tabs, .type-tabs {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tab-btn, .type-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        border-radius: 20px;
    }

    /* Carousel mobile */
    .carousel-btn {
        padding: 8px 15px;
        font-size: 16px;
    }

    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }

    /* Admin panel mobile */
    #admin-panel {
        margin: 1rem 0;
        padding: 1rem;
    }

    #admin-panel form .flex {
        flex-direction: column;
        gap: 0.75rem;
    }

    #admin-panel input,
    #admin-panel select,
    #admin-panel textarea {
        padding: 0.75rem;
        font-size: 1rem;
    }

    /* Sections mobile spacing */
    .expiring-soon,
    .newsletter {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }

    /* Hero section mobile */
    .hero-gradient {
        padding: 4rem 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-gradient p {
        font-size: 1.25rem;
    }

    /* Floating particles mobile */
    .floating-particle {
        display: none; /* Hide on mobile for performance */
    }

    /* Tips grid mobile */
    #tips-grid {
        gap: 1rem;
    }

    /* Testimonials mobile */
    .testimonials-grid {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .promo-card {
        padding: 0.5rem;
    }

    .promo-card img {
        height: 150px;
    }

    .promo-card h3 {
        font-size: 0.9rem;
    }

    .promo-card .price {
        font-size: 0.95rem;
    }

    .tab-btn, .type-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .category-tabs, .type-tabs {
        gap: 0.25rem;
    }

    /* Cart panel extra small */
    .cart-panel {
        width: 100vw;
    }

    .cart-header h3 {
        font-size: 1.25rem;
    }

    .cart-item {
        padding: 0.75rem;
    }

    .item-details h4 {
        font-size: 0.9rem;
    }

    .cart-total {
        font-size: 1rem;
    }

    .whatsapp-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Add to Cart button styles */
.add-to-cart-btn {
    background: linear-gradient(135deg, #7B1E3A, #1E90FF);
    color: #F9FAFB;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #1E90FF, #7B1E3A);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30,144,255,0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Admin buttons styles */
.admin-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    background: rgba(10,25,47,0.8);
    border: 1px solid rgba(30,144,255, 0.3);
    color: #F9FAFB;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.edit-btn:hover {
    background: rgba(30,144,255,0.8);
    transform: scale(1.1);
}

.delete-btn:hover {
    background: rgba(123,30,58,0.8);
    transform: scale(1.1);
}

/* Pulse animation for cart button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Advanced animations and enhancements */
.promo-card, .tip-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.promo-card:hover, .tip-card:hover {
    box-shadow: 0 0 20px rgba(30,144,255,0.5);
    transform: translateY(-5px) scale(1.02);
}
.tab-btn {
    transition: all 0.3s ease;
}
.tab-btn.active, .tab-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(30,144,255,0.5);
}
.staggered-card {
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.staggered-card.visible {
    opacity: 1;
    transform: translateY(0);
}
