/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.checkout-btn.disabled, .pay-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hiddens {
    display: none !important;
}

.animate-fade-in { animation: fadeIn 1s ease-out forwards; }
.animate-slide-up { animation: slideUp 1s ease-out 0.5s forwards; }

/* Hero Section */
.hero-section { position: relative; height: 100vh; overflow: hidden; opacity: 0; }
.hero-content { height: 100%; max-width: 1280px; margin: 0 auto; display: flex; align-items: center; color: white; }

/* Countdown */
.countdown-container { display: flex; margin-top: 1.5rem; justify-content: center; }
.countdown-wrapper { display: flex; align-items: center; gap: 4px; }
.countdown-box { width: 60px; height: 60px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8px; border-radius: 8px; backdrop-filter: blur(10px); background-color: var(--primary-bg-transparent); border: 1px solid var(--button-border-color); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; }
.countdown-box:hover { transform: translateY(-5px) scale(1.05); background-color: var(--primary-bg-transparent); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); border-color: rgba(255, 255, 255, 0.5); }
.countdown-number { font-size: 1.25rem; font-weight: bold; color: white; transition: all 0.3s ease; }
.countdown-label { font-size: 0.75rem; color: white; transition: all 0.3s ease; }
.countdown-separator { font-size: 1.5rem; font-weight: bold; color: white; animation: pulse 1.5s infinite; }

/* Buttons */
.button-container { margin-top: 1.5rem; display: flex; gap: 0.75rem; justify-content: center; }
.button { display: flex; align-items: center; justify-content: center; padding: 0.625rem 1.5rem; font-size: 0.875rem; font-weight: 500; border-radius: 9999px; transition: all 0.3s ease-in-out; }
.button-outline { border: 1px solid var(--button-border-color); background-color: transparent; }
.button-outline:hover { background-color: var(--button-hover-bg); color: white; }
.button-filled { background-color: var(--primary-bg); color: white; border: none; }
.button-filled:hover { opacity: 0.9; background-color: white; color: var(--accent-color); }

/* Category */
.category-tag { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; font-size: 0.75rem; border-radius: 9999px; border: 1px solid var(--button-border-color); transition: all 0.3s ease-in-out; }
.category-tag:hover { background-color: var(--button-hover-bg); color: white; }

@media (min-width: 1024px) {
    .countdown-container { justify-content: flex-start; }
    .button-container { justify-content: flex-start; gap: 1rem; margin-top: 2rem; }
}

@media (max-width: 768px) {
    .hero-content { justify-content: center; }
}

@media (min-width: 480px) {
    .countdown-box { width: 80px; height: 80px; padding: 10px; }
    .countdown-wrapper { gap: 8px; }
    .countdown-number { font-size: 1.875rem; }
    .countdown-label { font-size: 0.875rem; }
    .countdown-separator { font-size: 2rem; }
    .button { padding: 0.75rem 2rem; font-size: 1rem; }
    .category-tag { padding: 0.25rem 1rem; font-size: 0.875rem; }
}

/* Base styles for hero section */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.checkout-btn.disabled, .pay-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hiddens {
    display: none !important;
}

.animate-fade-in { animation: fadeIn 1s ease-out forwards; }
.animate-slide-up { animation: slideUp 1s ease-out 0.5s forwards; }

/* Hero Section */
.hero-section {
    position: relative;
    height: auto;
    overflow: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
}

.hero-content {
    height: 100%;
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Added overlay gradient */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

/* Model Container */
.model-container {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 5;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: visible;
}

.model-image {
    height: auto;
    max-height: 90vh;
    width: auto;
    max-width: 100%;
    object-fit: cover;
    object-position: left bottom;
}

/* Hero Container */
.hero-section {
    position: relative;
    min-height: 100vh;
    height: auto;
    overflow: hidden;
    opacity: 0;
}

.hero-content {
    min-height: 100vh;
    height: auto;
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    padding: 2rem 0;
}

.no-model-image .hero-content {
    justify-content: left !important;
    padding-bottom: 2rem;
    min-height: auto;
}

.no-model-image.hero-section {
    height: auto;
    min-height: auto;
    padding-bottom: 2rem;
}

/* For tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    .no-model-image .hero-content {
        padding: 4rem 2rem;
    }

    .no-model-image .hero-content > div.relative {
        width: 100% !important;
        max-width: 640px;
        margin: 0 auto;
    }
}

/* For mobile */
@media (max-width: 767px) {
    .no-model-image.hero-section {
        height: auto;
        min-height: auto;
    }

    .no-model-image .hero-content {
        padding: 3rem 1rem;
        height: auto;
    }

    .no-model-image .hero-content > div.relative {
        text-align: center;
        margin-bottom: 0;
    }
}

/* Content Height Auto-adjustment */
@media (min-width: 1024px) {
    .hero-content {
        padding: 2rem;
    }

    /* This makes the text content area adjust based on content */
    .hero-content > div.relative {
        max-width: 45%;
        padding-right: 2rem;
        min-height: 50vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Adjust model size based on content height */
    .model-container {
        position: absolute;
        right: 2rem;
        bottom: 0;
        width: 75%;
        height: auto;
        max-height: 100vh;
    }

    /* Make image size responsive to content */
    .model-image {
        height: auto;
        min-height: 110vh;
        max-height: 120vh;
        width: auto;
        max-width: 100%;
        object-fit: cover;
        object-position: center bottom;
        transition: max-height 0.3s ease;
    }

    .description-banner {
        color: white;
    }

    /* When description is short, limit model image height */
    .hero-content.short-description .model-image {
        max-height: 90vh;
    }

    /* When description is medium length, adjust image height */
    .hero-content.medium-description .model-image {
        min-height: 110vh;
        max-height: 120vh;
    }

    /* When description is long, allow full height */
    .hero-content.long-description .model-image {
        min-height: 120vh;
        max-height: 130vh;
    }
}

/* Countdown */
.countdown-container {
    display: flex;
    margin-top: 1.5rem;
    justify-content: center;
}

.countdown-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.countdown-box {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    background-color: var(--primary-bg-transparent);
    border: 1px solid var(--button-border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.countdown-box:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: var(--primary-bg-transparent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.countdown-number {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

.countdown-label {
    font-size: 0.75rem;
    color: white;
    transition: all 0.3s ease;
}

.countdown-separator {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    animation: pulse 1.5s infinite;
}

/* Buttons */
.button-container {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.3s ease-in-out;
}

.button-outline {
    border: 1px solid var(--primary-bg);
    background-color: transparent;
    color: white;
}

.button-outline:hover {
    background-color: var(--primary-bg);
    color: white;
}

.button-filled {
    background-color: var(--primary-bg);
    color: white;
    border: none;
}

.button-filled:hover {
    opacity: 0.9;
    background-color: white;
    color: var(--primary-bg);
}

/* Category */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--primary-bg);
    transition: all 0.3s ease-in-out;
    color: white;
}

.category-tag:hover {
    background-color: var(--button-hover-bg);
    color: white;
}

.text-gray-200 {
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

h1.text-4xl {
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* @media (min-width: 2560px) {
    .model-image {
        height: 50vh;
        max-height: 50vh;
    }
}

@media (min-width: 1440px) {
    .model-image {
        height: 130vh;
        max-height: 130vh;
    }
} */

@media (min-width: 1024px) {
    /* .hero-content {
        padding: 0 2rem;
    }

    .hero-content > div.relative {
        max-width: 45%;
        padding-right: 2rem;
    } */

    .countdown-container {
        justify-content: flex-start;
    }

    .button-container {
        justify-content: flex-start;
        gap: 1rem;
        margin-top: 2rem;
    }

    /* .model-container {
        position: absolute;
        right: 2rem;
        bottom: 0;
        width: 55%;
        height: 90%;
    } */
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-section {
        height: auto;
        padding-bottom: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .hero-content {
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem 2rem 0;
        height: 100%;
    }

    .hero-content > div.relative {
        width: 100% !important;
        padding-bottom: 1.5rem;
        flex: 0 0 auto;
        max-height: none;
        overflow: visible;
        margin-bottom: 1.5rem;
        z-index: 10;
    }

    main.mt-10 {
        margin-top: 1.5rem;
    }

    .countdown-box {
        width: 65px;
        height: 65px;
    }

    .countdown-number {
        font-size: 1.25rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }

    .model-container {
        position: relative;
        width: 100%;
        height: 100%;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        flex: 1 1 auto;
        overflow: visible;
    }

    .model-image {
        height: 900px;
        width: auto;
        max-width: 100%;
        object-fit: cover;
        object-position: left bottom;
    }
}

/* Mobile styles */
@media (max-width: 767px) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding-bottom: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .hero-content {
        flex-direction: column;
        justify-content: flex-start;
        padding: 1.5rem 1rem 0;
        height: auto;
        flex: 1;
    }

    .hero-content > div.relative {
        flex: 0 0 auto;
        max-height: none;
        overflow: visible;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        z-index: 10;
    }

    main.mt-10 {
        margin-top: 1rem;
    }

    h1.text-4xl {
        font-size: 2rem;
        line-height: 1.2;
    }

    p.mt-3 {
        margin-top: 0.5rem;
        font-size: 0.9rem;
    }

    .countdown-container {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .countdown-box {
        width: 50px;
        height: 50px;
        padding: 5px;
    }

    .countdown-number {
        font-size: 1rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    .countdown-separator {
        font-size: 1.25rem;
    }

    .button-container {
        margin-top: 1rem;
        flex-wrap: wrap;
    }

    .button {
        padding: 0.5rem 1.25rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .model-container {
        position: relative;
        width: 100%;
        height: auto;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        flex: 1 1 auto;
        overflow: visible;
        min-height: 250px;
    }

    .model-image {
        max-height: none;
        height: auto;
        max-width: 90%;
        object-fit: contain;
        object-position: center bottom;
        margin-bottom: 0;
    }

    .no-model .hero-content {
        justify-content: center;
        padding-bottom: 2rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .model-container {
        width: 100%;
        min-height: 200px;
    }

    .model-image {
        max-width: 90%;
        max-height: 50vh;
    }

    .countdown-box {
        width: 45px;
        height: 45px;
        padding: 4px;
    }

    .countdown-wrapper {
        gap: 2px;
    }

    .countdown-number {
        font-size: 0.9rem;
    }

    .countdown-label {
        font-size: 0.6rem;
    }

    .button-container {
        gap: 0.5rem;
    }

    .button {
        padding: 0.4rem 1rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    h1.text-4xl {
        font-size: 1.75rem;
    }
}

@media (max-width: 767px) and (min-height: 800px) {
    .hero-section {
        justify-content: space-between;
    }

    .hero-content {
        justify-content: space-between;
        padding-top: 2rem;
    }

    .model-container {
        margin-top: auto;
    }
}

:root {
    --button-border-color: rgba(255, 255, 255, 0.3);
    --button-hover-bg: rgba(255, 255, 255, 0.2);
    --accent-color: #4F46E5;
}
