/* ========== Fonts ========== */
@font-face {
    font-family: 'DG Agnadeen';
    src: url('../fonts/DGAgnadeen-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bebas Neue';
    src: url('../fonts/BebasNeue-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ========== Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== Body ========== */
body {
    min-height: 100vh;
    min-height: 100dvh;
    background-image: url('../images/common/MenuBG.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'DG Agnadeen', sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* ========== Blur Overlay ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
    pointer-events: none;
}

/* ========== Logo ========== */
.logo-container {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
}

.logo {
    width: clamp(50px, 10vw, 80px);
    height: clamp(50px, 10vw, 80px);
    object-fit: contain;
    display: block;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== Language Button ========== */
.lang-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 100;
    font-family: 'DG Agnadeen', sans-serif;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 600;
    color: #E9E0D0;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #E9E0D0;
    border-radius: 50px;
    padding: 10px 25px;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    background: #E9E0D0;
    color: #1a1a1a;
}

/* ========== Main Content ========== */
.main-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 15px 30px;
}

/* ========== Welcome Section ========== */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 15px;
}

.welcome-title {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    color: #E9E0D0;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 12px;
}

.welcome-text {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 400;
    color: #E9E0D0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
}

.pre-order-text {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: clamp(14px, 2vw, 18px);
    color: #E9E0D0;
    opacity: 0.85;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #E9E0D0;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.contact-btn:hover {
    background: #E9E0D0;
}

.contact-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(16px, 2vw, 20px);
    color: #E9E0D0;
    letter-spacing: 2px;
    transition: color 0.4s ease;
}

.contact-btn:hover .contact-number {
    color: #1a1a1a;
}

/* ========== Menu Section ========== */
.menu-section {
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(233, 224, 208, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.section-title {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: #E9E0D0;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ========== Products Grid (5 per row) ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

/* ========== Product Square ========== */
.product-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 16px;
    -webkit-border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-square:hover {
    transform: translateY(-5px) scale(1.03);
}

.product-square:active {
    transform: scale(0.95);
}

.product-square-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}

/* ========== Milk Options ========== */
.milk-options {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.milk-title-ar {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: 18px;
    color: #E9E0D0;
    text-align: center;
    margin-bottom: 12px;
}

.milk-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.milk-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.milk-name {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: 15px;
    color: #E9E0D0;
}

.milk-price {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #E9E0D0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.riyal-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    pointer-events: none;
}

/* ========== Flip Card ========== */
.flip-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    perspective: 1200px;
    -webkit-perspective: 1200px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.flip-card-front {
    z-index: 2;
}

.flip-card-back {
    transform: rotateY(180deg);
    z-index: 1;
}

/* ========== Footer Note ========== */
.footer-note {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.footer-ar {
    font-family: 'DG Agnadeen', sans-serif;
    font-size: clamp(12px, 1.5vw, 14px);
    color: #E9E0D0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 12px;
    line-height: 1.7;
}

.footer-en {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(13px, 1.5vw, 16px);
    color: #E9E0D0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* ========== Fullscreen Poster Overlay ========== */
.poster-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    overflow-y: auto;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.poster-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-overlay-content {
    position: relative;
    max-width: min(350px, 90vw);
    width: 100%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-full {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poster-vertical {
    position: relative;
    width: 100%;
    aspect-ratio: 1080 / 1920;
    max-height: 85vh;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    cursor: grab;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.poster-vertical:active {
    cursor: grabbing;
}

.poster-bg-vertical {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 18px;
}

.poster-cup-vertical {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%) rotate(-6deg);
    width: 55%;
    height: 40%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.poster-cup-vertical.dragging {
    transition: none;
    cursor: grabbing;
}

@keyframes cupFloatVertical {
    0%, 100% {
        transform: translateX(-50%) rotate(-6deg) translateY(0);
    }
    50% {
        transform: translateX(-50%) rotate(-6deg) translateY(-6px);
    }
}

.poster-vertical .poster-cup-vertical {
    animation: cupFloatVertical 3s ease-in-out infinite;
}

.poster-vertical .poster-cup-vertical.dragging {
    animation: none;
}

.close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E9E0D0;
    border: none;
    font-size: 18px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ffffff;
    transform: rotate(90deg);
}

/* ========== Tablet ========== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .lang-btn {
        top: 10px;
        right: 10px;
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ========== Mobile ========== */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .lang-btn {
        top: 8px;
        right: 8px;
        padding: 6px 14px;
        font-size: 12px;
    }

    .main-content {
        padding: 80px 10px 20px;
    }

    .menu-section {
        padding: 12px;
        margin-bottom: 25px;
    }
}

/* ========== Scroll Pop-in ========== */
.pop-ready {
    opacity: 0;
    scale: 0.6;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.5s ease,
                scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pop-ready.popped {
    opacity: 1;
    scale: 1;
}

@media (prefers-reduced-motion: reduce) {
    .pop-ready {
        opacity: 1;
        scale: 1;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* ========== Crops Language ========== */
.crop-en,
.crops-en .crop-ar {
    display: none;
}

.crops-en .crop-en {
    display: block;
}
