/*
Theme Name: DigiPOS Shop Theme
Theme URI: https://digipos.com
Author: DigiPOS
Author URI: https://digipos.com
Description: A modern restaurant/shop theme designed for DigiPOS online ordering system. Features customizable colors, video/image backgrounds, slider, busy status indicator, best sellers section, and seamless integration with DigiPOS plugin.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digipos-theme
Tags: restaurant, food, ordering, custom-colors, custom-background
*/

/* ========================================
   CSS Variables (Customizable via WP Customizer)
======================================== */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --text-color: #333333;
    --text-light: #ffffff;
    --bg-color: #ffffff;
    --bg-dark: #1a1a2e;
    --header-bg: rgba(0, 0, 0, 0.85);
    --footer-bg: #1a1a2e;
    --overlay-color: rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ========================================
   Reset & Base Styles
======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Background Video/Image
======================================== */
.background-media {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.background-media video,
.background-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    z-index: -1;
}

.bg-solid {
    background: var(--bg-dark);
}

/* ========================================
   Header
======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: var(--transition);
}

.site-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.site-header.scrolled .site-logo img {
    height: 40px;
}

.site-logo .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 25px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-color);
    color: var(--text-light);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icon {
    position: relative;
    color: var(--text-light);
    font-size: 22px;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
    cursor: pointer;
}

.nav-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 3px;
    transition: var(--transition);
}

/* ========================================
   Hero Slider
======================================== */
.hero-slider {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-light);
    z-index: 10;
    max-width: 800px;
    padding: 20px;
}

.slide-content h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.slider-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 20;
}

.slider-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.slider-arrow:hover {
    background: var(--primary-color);
}

/* ========================================
   Busy Status Bar
======================================== */
.busy-status-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 100%);
    padding: 40px 20px;
}

.busy-status-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.busy-status-info {
    flex: 1;
    min-width: 300px;
}

.busy-status-title {
    color: var(--text-light);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.busy-bar-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 5px;
    margin-bottom: 15px;
}

.busy-bar {
    height: 20px;
    border-radius: 20px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.busy-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.busy-bar.low { background: linear-gradient(90deg, #2ecc71, #27ae60); width: 30%; }
.busy-bar.medium { background: linear-gradient(90deg, #f39c12, #e67e22); width: 60%; }
.busy-bar.high { background: linear-gradient(90deg, #e74c3c, #c0392b); width: 90%; }

.busy-status-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.busy-status-text strong {
    color: var(--text-light);
}

.shop-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.shop-now-btn:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(231, 76, 60, 0.5);
}

.shop-now-btn svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   Best Sellers Section
======================================== */
.best-sellers-section {
    padding: 80px 20px;
    background: var(--bg-color);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
}

.add-to-cart-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* ========================================
   Previous Orders Section
======================================== */
.previous-orders-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.order-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.order-number {
    font-weight: 600;
    color: var(--primary-color);
}

.order-date {
    font-size: 14px;
    color: #666;
}

.order-items {
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #444;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.order-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.reorder-btn {
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.reorder-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.login-prompt {
    text-align: center;
    padding: 60px 20px;
}

.login-prompt h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.login-prompt p {
    color: #666;
    margin-bottom: 25px;
}

.login-btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.login-btn:hover {
    background: #c0392b;
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--footer-bg);
    color: var(--text-light);
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.contact-info svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.google-map {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 15px;
}

.google-map iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: #27ae60;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

/* ========================================
   Modal / Login Panel
======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary-color);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 992px) {
    .slide-content h1 {
        font-size: 40px;
    }

    .section-title {
        font-size: 32px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        min-height: 500px;
    }

    .slide-content h1 {
        font-size: 32px;
    }

    .slide-content p {
        font-size: 16px;
    }

    .busy-status-container {
        flex-direction: column;
        text-align: center;
    }

    .orders-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }

    .site-logo img {
        height: 40px;
    }

    .nav-icons {
        gap: 10px;
    }

    .nav-icon {
        font-size: 18px;
        padding: 8px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Mobile Menu
======================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--bg-dark);
    z-index: 2000;
    padding: 80px 30px 30px;
    transition: var(--transition);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--text-light);
    cursor: pointer;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    margin-bottom: 20px;
}

.mobile-menu ul li a {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-menu ul li a:hover {
    color: var(--primary-color);
}

/* ========================================
   Animations
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* ========================================
   Loading Spinner
======================================== */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
