:root {
    --primary-green: #27ae60;
    --dark-green: #1e8449;
    --primary-blue: #2980b9;
    --dark-blue: #1a5276;
    --dark-bg: #212f3c;
    --light-bg: #f4f7f6;
    --text-color: #2c3e50;
    --white: #ffffff;
    --error: #e74c3c;
    --success: #2ecc71;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    /* Increased side padding for better margin */
}

/* Auth Pages (Admin Login, User Login, Register) */
.auth-wrapper {
    min-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    border: 1px solid #edf2f7;
}

.auth-box h2 {
    margin-bottom: 30px;
    text-align: center;
    color: var(--dark-bg);
    font-size: 28px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 15px;
    color: #2d3748;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    font-size: 15px;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}

.btn-primary:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 14px 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background-color: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

/* Card Style */
.card {
    background: var(--white);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid #edf2f7;
}

/* Badge Style */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Social Sharing Buttons */
.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white) !important;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn.whatsapp {
    background-color: #25D366;
}

.share-btn.whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.share-btn.facebook {
    background-color: #1877F2;
}

.share-btn.facebook:hover {
    background-color: #0d65d9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
}

.share-btn.copy-link {
    background-color: var(--dark-bg);
}

.share-btn.copy-link:hover {
    background-color: #1a252f;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(33, 47, 60, 0.3);
}

/* Full Mobile Responsiveness */
@media (max-width: 1024px) {
    .container {
        padding: 15px 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px 15px;
    }

    /* Product Grids */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    /* Auth & Cards */
    .auth-wrapper {
        padding: 30px 15px;
    }

    .auth-box {
        padding: 25px;
    }

    /* Responsive Tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }

    .table {
        min-width: 600px;
        /* Force scroll on tiny screens */
    }

    /* Cart/Checkout Sidebar/Main layouts */
    .cart-layout,
    .checkout-layout,
    .grid-2col,
    .shop-layout,
    .product-layout,
    div[style*="display: grid; grid-template-columns: 2fr 1fr"],
    div[style*="display: grid; grid-template-columns: 1fr 1fr"],
    div[style*="display: grid; grid-template-columns: 250px 1fr"],
    div[style*="display: grid; grid-template-columns: 1fr 350px"],
    div[style*="display: grid; grid-template-columns: 1fr 400px"],
    div[style*="display: grid; grid-template-columns: 2fr 1.2fr"],
    div[style*="display:grid; grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .header-stack,
    .flex-stack {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
    }

    .header-stack .btn,
    .flex-stack .btn,
    .flex-stack input {
        width: 100% !important;
    }

    .flex-stack input {
        margin-bottom: 0 !important;
    }

    /* General Form Alignments */
    .form-control {
        font-size: 16px !important;
        /* Prevent zoom on iOS */
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .hero h1 {
        font-size: 32px !important;
    }

    .hero p {
        font-size: 16px !important;
    }

    .btn {
        width: 100% !important;
        margin-bottom: 5px;
    }

    /* Center text on mobile if needed */
    .section-title h2 {
        font-size: 26px;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    left: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
        font-size: 25px;
    }
}