/* ===== CSS Variables ===== */
:root {
    --primary-color: #00A86B;  /* Jade green */
    --secondary-color: #2E8B57;  /* Sea green */
    --accent-color: #FF6B6B;  /* Coral red for deals */
    --warning-color: #FFA500;
    --success-color: #32CD32;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #fff;
    overflow-x: hidden;
    max-width: 100vw;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Top Bar ===== */
.top-bar {
    background: var(--gray-100);
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.delivery-info i {
    color: var(--primary-color);
}

.store-selector select {
    padding: 5px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

/* ===== Navigation ===== */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    gap: 30px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-logo i {
    font-size: 2rem;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50px 0 0 50px;
    font-size: 16px;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 12px 25px;
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 0 50px 50px 0;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--secondary-color);
}

.nav-actions {
    display: flex;
    gap: 20px;
}

.nav-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--gray-700);
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
}

.nav-action:hover {
    color: var(--primary-color);
}

.nav-action i {
    font-size: 1.5rem;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    margin: 3px 0;
    transition: var(--transition);
}

/* ===== Category Navigation ===== */
.category-nav {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
}

.category-menu {
    display: flex;
    gap: 30px;
    padding: 15px 20px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.category-link:hover {
    color: var(--primary-color);
}

.category-link i {
    font-size: 1.2rem;
}

.category-link.special {
    color: var(--accent-color);
    font-weight: 700;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    padding: 40px 0;
    position: relative;
}

.hero-slider {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 0 20px;
}

.hero-slide.active {
    display: grid;
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--gray-700);
}

.slide-image {
    display: flex;
    justify-content: center;
}

.slide-image img {
    width: 400px;
    height: 300px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.placeholder-image {
    width: 400px;
    height: 300px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 6rem;
    box-shadow: var(--shadow-lg);
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-add-cart {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ===== Section Styles ===== */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

/* ===== Weekly Deals Section ===== */
.weekly-deals {
    background: var(--gray-100);
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 30px;
}

.deal-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.deal-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.product-image {
    height: 150px;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.deal-card:hover .product-image img,
.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-image-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.deal-card h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.product-unit {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.price-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.old-price {
    color: var(--gray-500);
    text-decoration: line-through;
}

.deal-price {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
}

.bogo-text {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Shop by Category Section ===== */
.shop-categories {
    padding: 80px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(45%, 150px), 1fr));
    gap: 20px;
}

.category-card {
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-image {
    height: 120px;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-image-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover .category-image {
    box-shadow: var(--shadow-lg);
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.category-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ===== Featured Products Section ===== */
.featured-products {
    background: var(--gray-100);
}

.products-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.product-brand {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.product-rating i {
    color: #FFD700;
    font-size: 0.9rem;
}

.product-rating span {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.product-price .unit {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* ===== Services Section ===== */
.services {
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 40px;
}

.service-card {
    text-align: center;
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
}

.service-card p {
    color: var(--gray-600);
}

/* ===== Newsletter Section ===== */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
}

.newsletter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    color: white;
    margin-bottom: 20px;
}

.newsletter p {
    margin-bottom: 30px;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
}

.newsletter-form .btn {
    background: white;
    color: var(--primary-color);
}

.newsletter-form .btn:hover {
    background: var(--gray-100);
}

/* ===== Store Locator Section ===== */
.store-locator {
    background: var(--gray-100);
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 30px;
}

.store-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.store-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.store-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--gray-700);
}

.store-info i {
    color: var(--primary-color);
    width: 20px;
}

.store-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.store-features span {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 15px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--gray-400);
    margin-bottom: 20px;
}

.footer-section h4 {
    margin-bottom: 20px;
}

.footer-section a {
    display: block;
    color: var(--gray-400);
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
}

.app-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.app-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: var(--transition);
}

.app-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.app-btn i {
    font-size: 2rem;
}

.app-btn span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
}

.app-btn strong {
    display: block;
    font-size: 1.1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
}

.footer-bottom a {
    color: var(--primary-color);
}

.created-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.created-by span {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.skyrise-logo-link {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.skyrise-logo {
    height: 35px;
    width: auto;
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

.skyrise-logo-link:hover {
    transform: scale(1.05);
}

.skyrise-logo-link:hover .skyrise-logo {
    filter: brightness(1.3);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== Cart Modal ===== */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.cart-modal.active {
    opacity: 1;
    pointer-events: all;
}

.cart-content {
    background: white;
    width: 400px;
    height: 100%;
    padding: 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-modal.active .cart-content {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close-cart {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--dark-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 30px;
}

.empty-cart {
    text-align: center;
    color: var(--gray-600);
    padding: 60px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-200);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: #dc3545;
}

.cart-footer {
    border-top: 1px solid var(--gray-200);
    padding-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
}

.cart-total span:last-child {
    color: var(--primary-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .nav-container {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        margin-top: 15px;
    }
    
    .hero-slide {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .placeholder-image {
        width: 300px;
        height: 225px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .category-menu {
        justify-content: start;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        justify-content: space-around;
        padding: 10px;
        z-index: 1000;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cart-content {
        width: 100%;
        max-width: 400px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 40px 0;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .deals-grid,
    .products-carousel {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stores-grid {
        grid-template-columns: 1fr;
    }
    
    .slide-image img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    .product-image,
    .category-image {
        height: 120px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .top-bar {
        font-size: 12px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-card h3 {
        font-size: 0.9rem;
    }
    
    .category-card p {
        font-size: 0.75rem;
    }
    
    .deal-card,
    .product-card {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}