:root {
    --primary-red: #D42426;
    --primary-green: #165B33;
    --gold: #F8B229;
    --cream: #FDF6E3;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    text-align: center;
    padding: 40px 0 20px;
    background: linear-gradient(to bottom, var(--white), var(--cream));
}

.logo-container {
    margin-bottom: 15px;
}

.logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

h1 {
    font-family: 'Great Vibes', cursive;
    color: var(--primary-red);
    font-size: 3.5rem;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--primary-green);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Navigation */
.category-nav {
    position: sticky;
    top: 0;
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
    overflow-x: auto;
}

#category-list {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
}

#category-list button {
    background: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

#category-list button:hover,
#category-list button.active {
    background-color: var(--primary-green);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 91, 51, 0.2);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.card-details {
    padding: 20px;
    text-align: center;
}

.card-details h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-details .price {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.1rem;
}

.view-btn {
    display: inline-block;
    margin-top: 15px;
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.product-card:hover .view-btn {
    border-color: var(--gold);
}

/* Footer */
.main-footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 40px;
    text-align: center;
}

.footer-info h3 {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 10px;
    opacity: 0.9;
}

.copyright {
    margin-top: 40px;
    font-size: 0.8rem;
    opacity: 0.7;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    z-index: 10;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-red);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }

    .modal-image {
        width: 50%;
        height: 500px;
    }

    .modal-details {
        width: 50%;
        padding: 40px;
    }
}

.modal-image {
    height: 300px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-cat-tag {
    display: inline-block;
    background-color: var(--cream);
    color: var(--primary-green);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    align-self: flex-start;
}

.modal-details h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.variations-list {
    margin-bottom: 30px;
}

.variation-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
}

.variation-item:last-child {
    border-bottom: none;
}

.variation-name {
    color: var(--text-dark);
}

.variation-price {
    color: var(--primary-red);
    font-weight: 700;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.instruction {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Snowflakes Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
    position: fixed;
    top: -10%;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
}

.snowflake:nth-of-type(0) {
    left: 1%;
    animation-delay: 0s, 0s;
}

.snowflake:nth-of-type(1) {
    left: 10%;
    animation-delay: 1s, 1s;
}

.snowflake:nth-of-type(2) {
    left: 20%;
    animation-delay: 6s, .5s;
}

.snowflake:nth-of-type(3) {
    left: 30%;
    animation-delay: 4s, 2s;
}

.snowflake:nth-of-type(4) {
    left: 40%;
    animation-delay: 2s, 2s;
}

.snowflake:nth-of-type(5) {
    left: 50%;
    animation-delay: 8s, 3s;
}

.snowflake:nth-of-type(6) {
    left: 60%;
    animation-delay: 6s, 2s;
}

.snowflake:nth-of-type(7) {
    left: 70%;
    animation-delay: 2.5s, 1s;
}

.snowflake:nth-of-type(8) {
    left: 80%;
    animation-delay: 1s, 0s;
}

.snowflake:nth-of-type(9) {
    left: 90%;
    animation-delay: 3s, 1.5s;
}

@keyframes snowflakes-fall {
    0% {
        top: -10%;
    }

    100% {
        top: 100%;
    }
}

@keyframes snowflakes-shake {
    0% {
        transform: translateX(0px);
    }

    50% {
        transform: translateX(80px);
    }

    100% {
        transform: translateX(0px);
    }
}

/* Modal Buttons Container */
.modal-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.variations-list {
    margin-bottom: 30px;
}

.variation-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
}

.variation-item:last-child {
    border-bottom: none;
}

.variation-name {
    color: var(--text-dark);
}

.variation-price {
    color: var(--primary-red);
    font-weight: 700;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.instruction {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Snowflakes Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
    position: fixed;
    top: -10%;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
}

.snowflake:nth-of-type(0) {
    left: 1%;
    animation-delay: 0s, 0s;
}

.snowflake:nth-of-type(1) {
    left: 10%;
    animation-delay: 1s, 1s;
}

.snowflake:nth-of-type(2) {
    left: 20%;
    animation-delay: 6s, .5s;
}

.snowflake:nth-of-type(3) {
    left: 30%;
    animation-delay: 4s, 2s;
}

.snowflake:nth-of-type(4) {
    left: 40%;
    animation-delay: 2s, 2s;
}

.snowflake:nth-of-type(5) {
    left: 50%;
    animation-delay: 8s, 3s;
}

.snowflake:nth-of-type(6) {
    left: 60%;
    animation-delay: 6s, 2s;
}

.snowflake:nth-of-type(7) {
    left: 70%;
    animation-delay: 2.5s, 1s;
}

.snowflake:nth-of-type(8) {
    left: 80%;
    animation-delay: 1s, 0s;
}

.snowflake:nth-of-type(9) {
    left: 90%;
    animation-delay: 3s, 1.5s;
}

@keyframes snowflakes-fall {
    0% {
        top: -10%;
    }

    100% {
        top: 100%;
    }
}

@keyframes snowflakes-shake {
    0% {
        transform: translateX(0px);
    }

    50% {
        transform: translateX(80px);
    }

    100% {
        transform: translateX(0px);
    }
}

/* Modal Buttons Container */
.modal-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.btn-secondary:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-whatsapp {
    flex: 2;
}

/* Post Generator Modal Specifics */
.post-modal-content {
    max-width: 600px;
    background-color: var(--cream);
}

/* Ensure Post Modal is above Product Modal */
#post-generator-modal {
    z-index: 1001;
}

.post-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

/* Instagram Post Template - 1080x1080 scaled down for preview */
#instagram-post-template {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #165B33 0%, #0F3D23 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: white;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

/* Decorative Elements */
.post-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--gold);
    z-index: 1;
    opacity: 0.5;
}

.post-decoration.top-left {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.post-decoration.top-right {
    top: 15px;
    right: 15px;
    border-left: none;
    border-bottom: none;
}

.post-decoration.bottom-left {
    bottom: 15px;
    left: 15px;
    border-right: none;
    border-top: none;
}

.post-decoration.bottom-right {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

/* Post Header */
.post-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    z-index: 2;
}

.post-logo {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    margin-bottom: 5px;
}

.post-brand {
    font-family: 'Great Vibes', cursive;
    font-size: 1.8rem;
    color: var(--gold);
}

/* Post Image - Premium Frame */
.post-image-container {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    /* Double border effect */
    border: 3px solid white;
    box-shadow:
        0 0 0 4px var(--gold),
        /* Outer gold ring */
        0 10px 20px rgba(0, 0, 0, 0.4);
    /* Deep shadow */
    overflow: hidden;
    margin-bottom: 20px;
    z-index: 2;
    background-color: white;
    position: relative;
}

#post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Post Info */
.post-info {
    text-align: center;
    z-index: 2;
    width: 100%;
}

#post-title {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 10px;
    font-weight: 600;
}

/* Premium Price Tag - Ribbon Style */
.post-price-tag {
    background: linear-gradient(to right, #D42426, #A01012);
    color: white;
    padding: 8px 30px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold);
    position: relative;
    transform: scale(1.1);
}

.post-price-tag::before,
.post-price-tag::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--gold);
    border-radius: 50%;
    transform: translateY(-50%);
}

.post-price-tag::before {
    left: 8px;
}

.post-price-tag::after {
    right: 8px;
}

.currency {
    font-size: 0.7em;
    vertical-align: top;
    margin-right: 4px;
    opacity: 0.9;
}

.post-cta {
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Actions */
.post-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background-color: #0F3D23;
    transform: translateY(-2px);
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
    #instagram-post-template {
        width: 320px;
        height: 320px;
        padding: 15px;
    }

    .post-logo {
        width: 50px;
    }

    .post-brand {
        font-size: 1.2rem;
    }

    .post-image-container {
        width: 160px;
        height: 160px;
        margin-bottom: 10px;
    }

    #post-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .post-price-tag {
        font-size: 1.2rem;
        padding: 5px 20px;
        margin-bottom: 10px;
    }

    .post-cta {
        font-size: 0.7rem;
    }
}