/* مزارع الثنيان - Al Thenayan Farms Theme */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Cairo', sans-serif;
    background: #f8fdf5;
    color: #2d3a2e;
    direction: rtl;
    line-height: 1.6;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #2e7d32;
    color: #fff;
    padding: 6px 0;
    font-size: 13px;
    text-align: center;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 50px;
    border-radius: 8px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #2e7d32;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #2e7d32;
}

.cart-icon {
    position: relative;
    text-decoration: none;
    font-size: 24px;
    color: #2e7d32;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Banner Slider */
.banner-slider {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 40px 30px 30px;
    color: #fff;
}

.banner-overlay h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.banner-overlay p {
    font-size: 16px;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dot.active {
    background: #fff;
}

/* Section Titles */
.section-title {
    text-align: center;
    padding: 40px 20px 20px;
}

.section-title h2 {
    font-size: 28px;
    color: #2e7d32;
    margin-bottom: 8px;
}

.section-title p {
    color: #666;
    font-size: 15px;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 20px 30px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(46,125,50,0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2d3a2e;
}

.product-info .price {
    font-size: 18px;
    font-weight: 700;
    color: #2e7d32;
}

.product-info .price span {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.product-info .desc {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

.add-to-cart-btn {
    display: block;
    width: calc(100% - 30px);
    margin: 0 15px 15px;
    padding: 10px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-cart-btn:hover {
    background: #1b5e20;
}

/* Countdown Banner */
.countdown-banner {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%);
    padding: 20px 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.countdown-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.countdown-inner {
    position: relative;
    z-index: 1;
}

.countdown-text {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fire-icon {
    font-size: 24px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: ltr;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 65px;
    border: 1px solid rgba(255,255,255,0.2);
}

.countdown-num {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    margin-top: 4px;
    font-weight: 500;
}

.countdown-sep {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.countdown-sub {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    margin-top: 12px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .countdown-text {
        font-size: 16px;
    }
    .countdown-unit {
        padding: 8px 12px;
        min-width: 55px;
    }
    .countdown-num {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .countdown-text {
        font-size: 14px;
    }
    .countdown-unit {
        padding: 6px 10px;
        min-width: 48px;
    }
    .countdown-num {
        font-size: 18px;
    }
    .countdown-sep {
        font-size: 18px;
    }
}

/* Footer */
.footer {
    background: #1b5e20;
    color: #fff;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    opacity: 0.8;
    font-size: 14px;
}

/* Buttons */
.btn-primary {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: #1b5e20;
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: transparent;
    color: #2e7d32;
    border: 2px solid #2e7d32;
    padding: 10px 25px;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #2e7d32;
    color: #fff;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #2e7d32;
}

/* Responsive */
@media (max-width: 768px) {
    .header-main {
        padding: 10px 15px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .banner-slider {
        height: 220px;
    }

    .banner-overlay h2 {
        font-size: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px;
    }

    .product-card img {
        height: 140px;
    }

    .section-title h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .product-info {
        padding: 10px;
    }

    .product-info h3 {
        font-size: 13px;
    }

    .product-info .price {
        font-size: 15px;
    }
}

/* ===== Page Transition & Loading Effects ===== */

/* Top Progress Bar */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4caf50, #81c784, #2e7d32);
    z-index: 9999;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.page-progress.active {
    animation: progressAnim 1.2s ease-out forwards;
}

@keyframes progressAnim {
    0% { width: 0; }
    30% { width: 60%; }
    60% { width: 85%; }
    100% { width: 100%; }
}

/* Page Fade-in */
.page-content {
    opacity: 0;
    transform: translateY(12px);
    animation: pageFadeIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.1s forwards;
}

@keyframes pageFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1), transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered product cards */
.product-card.reveal {
    transition-delay: calc(var(--reveal-delay, 0) * 80ms);
}

/* Page exit animation */
.page-exit {
    animation: pageExit 0.25s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes pageExit {
    to {
        opacity: 0.4;
        transform: translateY(-8px);
    }
}

/* Skeleton loading for images */
.img-loading {
    background: linear-gradient(90deg, #e8f5e9 25%, #c8e6c9 50%, #e8f5e9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Delivery Info Page ===== */
.delivery-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
}

.delivery-form .form-group {
    margin-bottom: 20px;
}

.delivery-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2d3a2e;
    font-size: 14px;
}

.delivery-form input,
.delivery-form select,
.delivery-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    direction: rtl;
}

.delivery-form input:focus,
.delivery-form select:focus,
.delivery-form textarea:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.delivery-form textarea {
    resize: vertical;
    min-height: 80px;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 30px;
    padding: 0 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.step.active {
    color: #2e7d32;
    font-weight: 700;
}

.step.completed {
    color: #4caf50;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #e0e0e0;
    color: #666;
}

.step.active .step-num {
    background: #2e7d32;
    color: #fff;
}

.step.completed .step-num {
    background: #4caf50;
    color: #fff;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e0e0e0;
}

.step-line.active {
    background: #4caf50;
}
