/* ============================================================
   Registani Achar — Unified Storefront Stylesheet
   Covers: Login, Landing, Shop pages
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    --primary:       #b45309;
    --primary-dark:  #78350f;
    --primary-light: #f59e0b;
    --accent:        #991b1b;
    --bg-sand:       #fffcf7;
    --text-dark:     #1c0d02;
}

/* ---- Base ---- */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, .playfair { font-family: 'Playfair Display', serif; }

/* Override Bootstrap Primary (Blue) */
.text-primary { color: var(--primary) !important; }
.btn-primary { 
    background-color: var(--primary) !important; 
    border-color: var(--primary) !important;
    color: white !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
}

/* Link Reset */
a { color: var(--primary); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--primary-dark); }

/* Focus Ring Override (No more blue!) */
.form-control:focus, .btn:focus, .form-check-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.15) !important;
    outline: none !important;
}

/* Autofill Fix (No more blue inputs) */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: var(--text-dark) !important;
}

/* ============================================================
   FLOATING SPICE ANIMATION (all pages)
   ============================================================ */
.spice-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    bottom: -120px;
    opacity: 0;
    animation: floatSpice linear infinite;
}

@keyframes floatSpice {
    0%   { transform: translateY(0)       rotate(0deg);   opacity: 0;    }
    8%   {                                                opacity: 0.18; }
    40%  { transform: translateY(-45vh)   rotate(160deg); opacity: 0.15; }
    65%  { transform: translateY(-72vh)   rotate(280deg); opacity: 0.10; }
    82%  { transform: translateY(-85vh)   rotate(340deg); opacity: 0;    }
    100% { transform: translateY(-100vh)  rotate(360deg); opacity: 0;    }
}

/* ============================================================
   AMBIENT ORBS (Login Page)
   ============================================================ */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .15;
    animation: float 8s ease-in-out infinite;
}
.bg-orb-1 { width:500px; height:500px; background: radial-gradient(circle,var(--primary),transparent); top:-150px; left:-150px; }
.bg-orb-2 { width:400px; height:400px; background: radial-gradient(circle,var(--accent),transparent);  bottom:-100px; right:-100px; animation-delay:3s; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-sand);
    position: relative;
    overflow: hidden;
}

.login-wrap { position: relative; z-index: 10; width: 100%; max-width: 420px; padding: 1rem; }

.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo-container {
    width: 90px; height: 90px; border-radius: 50%; background: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(180,83,9,.15); margin-bottom: 1.5rem;
    border: 3px solid var(--primary); padding: 10px;
}
.login-logo h1 { font-size: 1.6rem; font-weight: 800; color: var(--text-dark); margin-bottom: .25rem; }
.login-logo p  { font-size: .85rem; color: #64748b; font-weight: 500; }

.login-card {
    background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
    border: 1px solid rgba(180,83,9,.1); border-radius: 2rem;
    padding: 2.5rem; box-shadow: 0 25px 60px rgba(180,83,9,.08);
}

.login-card .form-label { font-size: .78rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }

.input-group-custom { position: relative; }
.input-prefix { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: .9rem; z-index: 2; opacity: .6; }

.login-card .form-control {
    background: #fff; border: 1.5px solid #e2e8f0;
    border-radius: .875rem; color: var(--text-dark);
    padding: .875rem 1rem .875rem 3rem;
    font-size: .875rem; transition: all .2s ease; width: 100%;
}
.login-card .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(180,83,9,.1); outline: none; }

.btn-login {
    width: 100%; padding: 1rem; border: none; border-radius: 1rem;
    background: linear-gradient(135deg,var(--primary),var(--primary-dark)); color: #fff;
    font-size: .95rem; font-weight: 700; letter-spacing: .02em; cursor: pointer;
    box-shadow: 0 8px 24px rgba(180,83,9,.25); transition: all .25s ease; margin-top: .5rem;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(180,83,9,.35); }

.login-card .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.login-card .form-check-label { color: #64748b; font-size: .82rem; font-weight: 500; }

.alert-error { background: #fef2f2; border: 1px solid #fee2e2; border-radius: .75rem; padding: .875rem 1rem; margin-bottom: 1.25rem; }
.alert-error li { color: #b91c1c; font-size: .82rem; font-weight: 600; }

.login-footer { text-align: center; margin-top: 2rem; font-size: .82rem; color: #94a3b8; font-weight: 500; }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.hero-banner {
    height: 90vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.hero-content { max-width: 700px; padding: 40px; }
.hero-title   { font-size: 4.5rem; line-height: 1.1; margin-bottom: 20px; text-shadow: 2px 2px 10px rgba(0,0,0,.5); }

.navbar-custom {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1200px;
    background: rgba(255,255,255,0.8); backdrop-filter: blur(15px);
    border: 1px solid rgba(180, 83, 9, 0.1); border-radius: 50px;
    padding: 12px 35px; z-index: 1030;
    display: flex; justify-content: space-between; align-items: center; transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 40px rgba(180, 83, 9, 0.05);
}

.navbar-custom.scrolled {
    background: white;
    top: 0; width: 100%; border-radius: 0;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    padding: 10px 40px;
}

.navbar-custom .nav-link-custom {
    color: var(--text-dark) !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.3s;
    opacity: 0.75;
}

.navbar-custom .nav-link-custom:hover {
    color: var(--primary) !important;
    opacity: 1;
    transform: translateY(-1px);
}

.nav-logo img { height: 48px; border-radius: 50%; border: 2px solid var(--primary); }

.feature-box {
    padding: 40px; background: white; border-radius: 30px;
    box-shadow: 0 10px 40px rgba(69,26,3,.05); transition: .4s;
    height: 100%; text-align: center; border: 1px solid rgba(180,83,9,.1);
}
.feature-box:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(180,83,9,.15); }

.icon-wrap {
    width: 80px; height: 80px; background: #fff7ed; color: var(--primary);
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 20px;
}

.heritage-section { background: #1c0d02; color: white; padding: 100px 0; }
.heritage-img { border-radius: 40px; box-shadow: 20px 20px 0 var(--primary); width: 100%; }

.store-premium-card {
    background: white; border-radius: 24px; padding: 30px; margin-bottom: 25px;
    display: flex; align-items: center; gap: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,.03); border: 1px solid rgba(180,83,9,.1);
}

.btn-premium {
    background: var(--primary); color: white; padding: 15px 35px;
    border-radius: 50px; font-weight: 600; text-decoration: none; transition: .3s; display: inline-block;
}
.btn-premium:hover { background: var(--primary-dark); transform: scale(1.05); color: white; }

.whatsapp-float {
    position: fixed; bottom: 40px; right: 40px;
    background: #25d366; color: white; width: 65px; height: 65px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: 0 10px 25px rgba(37,211,102,.3); z-index: 3000; text-decoration: none;
}

/* ============================================================
   SHOP PAGE
   ============================================================ */
.shop-body {
    background: linear-gradient(135deg, #fffcf7 0%, #ffedd5 100%);
    min-height: 100vh;
    padding-bottom: 100px;
}

.shop-header {
    background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(180,83,9,0.08); padding: 12px 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 4px 25px rgba(180,83,9,0.05);
}

.store-logo {
    width: 50px; height: 50px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--primary); box-shadow: 0 4px 10px rgba(180,83,9,.2);
}

.product-card {
    background: white; border-radius: 28px; border: 1px solid rgba(180,83,9,.05);
    overflow: hidden; transition: .4s cubic-bezier(0.175,.885,.32,1.275);
    box-shadow: 0 10px 30px rgba(69,26,3,.03); height: 100%;
}
.product-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(180,83,9,.12); }

.img-container { height: 180px; overflow: hidden; position: relative; background: #fffcf7; }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); }
.product-card:hover .product-img { transform: scale(1.1) rotate(2deg); }

.price-tag {
    position: absolute; top: 15px; right: 15px;
    background: rgba(255,255,255,.9); backdrop-filter: blur(5px);
    padding: 5px 15px; border-radius: 50px;
    font-weight: 700; color: var(--primary); font-size: .9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
}

.add-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white; border: none; width: 45px; height: 45px;
    border-radius: 15px; display: flex; align-items: center; justify-content: center;
    transition: .3s; box-shadow: 0 4px 15px rgba(180,83,9,.3);
}
.add-btn:active { transform: scale(.9); }

.bottom-nav {
    position: fixed; bottom: 20px; left: 20px; right: 20px;
    background: rgba(28,13,2,.95); backdrop-filter: blur(10px);
    border-radius: 24px; display: flex; justify-content: space-around;
    padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 2000;
}
.nav-item { color: rgba(255,255,255,.6); text-decoration: none; text-align: center; font-size: 11px; position: relative; }
.nav-item.active { color: #fbbf24; }

.cart-count-badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--accent); color: white;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; border: 2px solid #1c0d02;
}

/* ============================================================
   TOAST / ALERTS (shared)
   ============================================================ */
.alert-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    padding: 15px 30px; border-radius: 50px; font-weight: 600;
    box-shadow: 0 15px 30px rgba(0,0,0,.1); z-index: 5000;
    display: flex; align-items: center; gap: 12px; min-width: 300px;
    animation: slideDown .5s cubic-bezier(0.68,-0.55,0.265,1.55);
}
.alert-toast.success { background: #10b981; color: white; }
.alert-toast.error   { background: #ef4444; color: white; }

@keyframes slideDown {
    from { transform: translate(-50%,-100%); opacity: 0; }
    to   { transform: translate(-50%,0);    opacity: 1; }
}

/* ============================================================
   CHECKOUT PAGE
   ============================================================ */
.card-premium {
    background: white; border-radius: 28px;
    border: 1px solid rgba(180, 83, 9, 0.05);
    box-shadow: 0 10px 30px rgba(69, 26, 3, 0.03);
    overflow: hidden; margin-bottom: 25px;
}
.card-header-premium {
    background: rgba(180, 83, 9, 0.03);
    padding: 20px 25px; border-bottom: 1px solid rgba(180, 83, 9, 0.05);
}
.payment-option {
    border: 2px solid #f1f5f9; border-radius: 20px;
    padding: 20px; cursor: pointer; transition: 0.3s;
    margin-bottom: 15px; display: flex; align-items: center; gap: 15px; background: #fff;
}
.payment-option:hover { border-color: var(--primary-light); background: rgba(180, 83, 9, 0.02); }
.payment-option.active {
    border-color: var(--primary); background: rgba(180, 83, 9, 0.05);
    box-shadow: 0 10px 20px rgba(180, 83, 9, 0.1);
}
.payment-option input { display: none; }
.item-row { padding: 15px 0; border-bottom: 1px dashed #e2e8f0; }
.item-row:last-child { border-bottom: none; }
.btn-place-order {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white; border: none; padding: 18px; border-radius: 20px;
    font-weight: 700; font-size: 1.1rem; transition: 0.3s;
    box-shadow: 0 10px 25px rgba(180, 83, 9, 0.3); width: 100%;
}
.btn-place-order:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(180, 83, 9, 0.4); color: white; }
.summary-label { font-size: 0.85rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.back-btn { color: var(--text-dark); text-decoration: none; font-weight: 600; transition: 0.3s; display: inline-block; }
.back-btn:hover { color: var(--primary); transform: translateX(-5px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero-title  { font-size: 2.8rem; }
    .navbar-custom { width: 95%; padding: 10px 20px; }
    .hero-banner { height: 80vh; }
}
@media (max-width: 576px) {
    .img-container { height: 160px; }
    .login-card { padding: 1.5rem; }
    .login-wrap { padding: .75rem; }
    .product-card { border-radius: 20px; }
}

/* Floating Checkout Bar (Mobile Friendly) */
.checkout-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(28, 13, 2, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1500;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(180, 83, 9, 0.2);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-icon-wrap { position: relative; }
.float-cart-count {
    position: absolute; top: -8px; right: -8px;
    background: var(--primary); color: white;
    font-size: 10px; font-weight: 700; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: 2px solid #1c0d02;
}

.btn-checkout-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white !important; padding: 10px 20px; border-radius: 15px;
    font-weight: 700; font-size: 0.9rem; text-decoration: none;
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.3);
}

/* Product Modal Styling */
.modal-img-container { position: relative; background: #f8f9fa; }
.modal-price-badge {
    position: absolute; bottom: 20px; right: 20px;
    background: var(--primary); color: white;
    padding: 10px 25px; border-radius: 15px;
    font-weight: 700; font-size: 1.2rem;
    box-shadow: 0 8px 25px rgba(180, 83, 9, 0.3);
    z-index: 5;
}
.modal-content { box-shadow: 0 25px 80px rgba(0,0,0,0.2); }
.product-card { cursor: pointer; }

/* Mobile Bottom Sheet Modal */
@media (max-width: 768px) {
    #productModal .modal-dialog {
        margin: 0;
        position: fixed;
        bottom: 0;
        width: 100%;
        max-width: 100%;
    }
    #productModal .modal-content {
        border-radius: 35px 35px 0 0;
        border: none;
        max-height: 85vh;
        overflow-y: auto;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    }
    #productModal .modal-body {
        padding-bottom: 30px;
    }
}

/* Inline Qty Controls */
.qty-selector-inline {
    display: flex;
    align-items: center;
    background: #fff7ed;
    border-radius: 50px;
    padding: 4px;
    border: 1px solid rgba(180,83,9,0.1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.qty-btn-minimal {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.qty-btn-minimal:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.qty-value {
    min-width: 25px;
    text-align: center;
    font-size: 0.9rem;
}

/* Horizontal Card Layout (Mobile Focused) */
.h-card-inner {
    display: flex;
    flex-direction: row;
    height: 100%;
}

.h-card-img {
    width: 130px;
    min-width: 130px;
    height: 130px;
    overflow: hidden;
    background: #fffcf7;
    position: relative;
}

.h-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.h-card-details {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    overflow: hidden;
}

/* Responsive Overrides */
@media (min-width: 768px) {
    .h-card-inner {
        flex-direction: column;
    }
    .h-card-img {
        width: 100%;
        height: 180px;
    }
}

/* ============================================================
   LANDING PAGE RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .hero-title { font-size: 3.2rem; }
    .hero-banner { height: auto; padding: 120px 0 60px; }
}

@media (max-width: 768px) {
    .navbar-custom { width: 95%; padding: 10px 20px; top: 10px; }
    .nav-logo img { height: 40px; }
    .hero-title { font-size: 2.5rem; text-align: center; }
    .hero-content { padding: 20px; text-align: center; }
    .hero-content p { margin-bottom: 30px !important; }
    .hero-content .d-flex { justify-content: center; flex-direction: column; gap: 15px !important; }
    
    .feature-box { padding: 30px 20px; margin-bottom: 20px; }
    
    .heritage-section { padding: 60px 0; }
    .heritage-img { margin-bottom: 40px; }
    
    .store-premium-card {
        flex-direction: column;
        text-align: center;
        padding: 25px;
        gap: 15px;
    }
    
    .store-premium-card .text-end {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 10px !important;
    }
    
    .store-premium-card .text-end a, 
    .store-premium-card .text-end button {
        width: 100%;
    }
    
    .whatsapp-float { width: 55px; height: 55px; bottom: 20px; right: 20px; font-size: 26px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
}

/* Modal Responsive Fixes */
@media (max-width: 576px) {
    #shopModal .modal-body { padding: 30px 20px !important; }
    #shopModal h3 { font-size: 1.5rem; }
}

/* Aggressive Mobile Corrections */
@media (max-width: 768px) {
    .spice-layer { display: none; }
    .navbar-custom { 
        width: 100% !important; 
        top: 0 !important; 
        border-radius: 0 !important; 
        padding: 10px 20px !important;
        transform: none !important;
        left: 0 !important;
    }
    .hero-banner { padding: 100px 0 40px !important; min-height: auto; }
    .hero-title { font-size: 2.2rem !important; }
    .display-4 { font-size: 2.2rem !important; }
    .display-5 { font-size: 1.8rem !important; }
    
    section { padding: 40px 0 !important; }
    .py-5 { padding-top: 30px !important; padding-bottom: 30px !important; }
    
    .heritage-img { box-shadow: 10px 10px 0 var(--primary); }
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Ensure no AOS or spice elements overflow */
.spice-layer, .hero-image-wrap, [data-aos] {
    max-width: 100vw;
}

/* Resolve Right-side Overflow */
@media (max-width: 991px) {
    .hero-badge { right: 0 !important; bottom: 0 !important; transform: scale(0.8); }
    .hero-image-wrap { margin-bottom: 30px; }
    .heritage-img { box-shadow: none !important; border: 4px solid var(--primary); }
}

/* Force Hidden Overflow on problematic sections */
section, .hero-banner, .heritage-section {
    overflow: hidden;
}
