/* Google Fonts Outfit & Inter */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #10b981; /* Premium Emerald */
    --primary-hover: #059669;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body.o_order_portal {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

/* Custom Header with language toggle and title */
.portal-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.portal-header h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
}

.lang-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* Category Slider */
.category-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 1rem 0;
    gap: 0.75rem;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

.category-tabs::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.category-tab {
    background: #ffffff;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-tab.active, .category-tab:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Product Cards Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 65%; /* Aspect Ratio 16:10 */
    background: #f1f5f9;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sold-out-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-grow: 1;
    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-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.btn-add-cart {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-cart:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.btn-add-cart:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Floating Cart Badge Mobile */
.floating-cart-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    z-index: 1000;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f43f5e;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Side Cart / Checkout Container */
.checkout-panel {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.checkout-panel::-webkit-scrollbar {
    width: 6px;
}

.checkout-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.checkout-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.checkout-panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.checkout-panel-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.6rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-item-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.cart-qty-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.cart-qty-btn:hover {
    background: #e2e8f0;
}

.form-section-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1.5rem 0 1rem 0;
    color: #475569;
}

.btn-checkout-submit {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.8rem;
    font-weight: 600;
    font-size: 1.05rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.btn-checkout-submit:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Confirmation Page */
.confirm-card {
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    padding: 3rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    margin: 3rem auto;
    text-align: center;
}

.confirm-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.confirm-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.2rem;
    color: #0f172a;
    margin-bottom: 1rem;
}
