/* =========================
   GLOBAL SETTINGS
========================= */

:root{
    --primary-color:#df4b0b;
    --primary-dark:#005d3d;
    --accent-color:#ffeb3b;
    --inactive-color:#757575;
    --bg-light:#f6f8f7;
    --white:#ffffff;
    --shadow:0 8px 25px rgba(0,0,0,0.08);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
    background:var(--bg-light);
    overflow-x:hidden;
    padding-top:80px;
    padding-bottom:90px;
}

/* =========================
   SPLASH SCREEN
========================= */

#splash-screen{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100vh;
    background:linear-gradient(135deg,#df4b0b,#c17015);
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.splash-icon{
    font-size:65px;
    color:white;
    animation:popIn 1s ease;
}

.splash-title{
    color:white;
    font-size:32px;
    font-weight:800;
    margin-top:20px;
}

.splash-subtitle{
    color:var(--accent-color);
    margin-top:10px;
    font-size:15px;
}

@keyframes popIn{

    0%{
        transform:scale(.4);
        opacity:0;
    }

    100%{
        transform:scale(1);
        opacity:1;
    }

}

/* =========================
   HEADER
========================= */

.header-search{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:72px;
    background:#df4b0b;
    backdrop-filter:blur(10px);
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 18px;
    z-index:1000;
    box-shadow:0 4px 20px rgba(0,0,0,.15);
}

.logo-section{
    display:flex;
    align-items:center;
    color:white;
}

.logo-icon{
    font-size:24px;
    margin-right:8px;
}

.logo-text{
    font-size:22px;
    font-weight:800;
}

.logo-text span{
    color:#1d8b06 !important;
}

.search-container{
    position:relative;
    width:52%;
}

.search-icon-inside{
    position:absolute;
    top:50%;
    left:15px;
    transform:translateY(-50%);
    color:#666;
}

#searchInput{
    width:100%;
    border:none;
    outline:none;
    padding:10px 15px 10px 40px;
    border-radius:50px;
    font-size:14px;
    transition:.3s;
}

#searchInput:focus{
    transform:scale(1.03);
}

/* =========================
   MAIN CONTENT
========================= */

#main-content{
    animation:fadeIn .8s ease;
}

@keyframes fadeIn{

    from{
        opacity:0;
        transform:translateY(15px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

/* =========================
   BANNER
========================= */

.banner{
    width:100%;
    height:220px;
    overflow:hidden;
    position:relative;
}

.banner img{
    width:100%;
    height:100%;
    object-fit:cover;
    animation:zoomBanner 12s infinite;
}

@keyframes zoomBanner{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.08);
    }

    100%{
        transform:scale(1);
    }

}

.bannerText{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.25);
    color:white;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding-left:20px;
}

.bannerText h1{
    font-size:26px;
    margin-bottom:5px;
}

.bannerText p{
    font-size:13px;
    max-width:280px;
    line-height:1.5;
}

.bannerText h3{
    color:#FFD700;
    margin-top:8px;
    font-size:13px;
}

/* =========================
   CONTENT AREA
========================= */

.content-area{
    max-width:1200px;
    margin:auto;
    padding:15px;
}

.content-area h3{
    color:#222;
    margin-bottom:5px;
}

.content-area p{
    color:#666;
    font-size:14px;
    margin-bottom:15px;
}
/* =========================
   PRODUCTS SECTION
========================= */

#productList,
#categoryProductList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 5px 18px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.card img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  transition: transform 0.3s;
}

.card:hover img {
  transform: scale(1.08);
}

.card h2 {
  font-size: 15px;
  margin: 8px 0;
  color: #222;
}

.offer {
  background: #e8f5e9;
  color: #df4b0b;
  font-size: 11px;
  font-weight: bold;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 5px;
}

.card p {
  margin: 5px 0;
  font-size: 15px;
  font-weight: bold;
}

.card del {
  color: gray;
  font-size: 12px;
  margin-left: 5px;
}

.qty {
  width: 60px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  margin: 8px auto;
}

.card button {
  width: 100%;
  border: none;
  background: #df4b0b;
  color: white;
  padding: 10px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.card button:hover {
  background: #005f3c;
}

/* =========================
   CATEGORY SECTION
========================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(130px,1fr));
  gap: 15px;
}

.store-card {
  background: white;
  border-radius: 15px;
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.store-card:hover {
  transform: translateY(-4px);
}

.store-card i {
  font-size: 28px;
  color: #df4b0b;
  margin-bottom: 10px;
}

.store-card.active-cat {
  background: #df4b0b;
  color: white;
}

.store-card.active-cat i {
  color: white;
}

/* =========================
   CART SECTION
========================= */

.cart-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: 15px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-right: 15px;
}

.cart-details {
  flex: 1;
}

.cart-details h4 {
  margin: 0;
  font-size: 15px;
}

.cart-details p {
  margin: 5px 0;
  color: gray;
}

.remove-btn {
  background: none;
  border: none;
  color: red;
  font-size: 18px;
  cursor: pointer;
}

.cart-summary {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: bold;
}

.checkout-btn,
.place-order-btn {
  width: 100%;
  background: #df4b0b;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  transition: 0.3s;
}

.checkout-btn:hover,
.place-order-btn:hover {
  background: #005f3c;
}

/* =========================
   CHECKOUT FORM
========================= */

.checkout-form {
  background: white;
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.checkout-form label {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-sizing: border-box;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: #df4b0b;
  outline: none;
}

/* =========================
   ADMIN SECTION
========================= */

.admin-table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 15px;
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #f4f4f4;
  padding: 14px;
  text-align: left;
}

.admin-table td {
  padding: 12px;
  border-top: 1px solid #eee;
}

.admin-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
  gap: 15px;
}

.logout-btn {
  background: #ffebee;
  color: red;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
}

/* =========================
   ANIMATION
========================= */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===========================
   TOAST NOTIFICATION
=========================== */

#toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #df4b0b;
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 99999;
    opacity: 0;
    transition: 0.4s;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===========================
   SMOOTH ANIMATIONS
=========================== */

.card,
.store-card,
.cart-item,
.checkout-form,
.admin-table-wrapper,
.cart-summary {
    animation: fadeCard 0.5s ease;
}

@keyframes fadeCard {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.card:hover {
    transform: translateY(-6px);
}

.card,
.store-card,
button {
    transition: all 0.3s ease;
}

button:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

button:active {
    transform: scale(0.97);
}

/* ===========================
   SCROLLBAR
=========================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f2f2f2;
}

::-webkit-scrollbar-thumb {
    background: #df4b0b;
    border-radius: 20px;
}

/* ===========================
   MOBILE RESPONSIVE
=========================== */

@media(max-width:768px){

    .header-search{
        padding:0 12px;
    }

    .logo-text{
        font-size:18px;
    }

    .search-container{
        width:55%;
    }

    #productList,
    #categoryProductList{

        grid-template-columns:
        repeat(2,1fr);

        gap:12px;

    }

    .card{

        padding:12px;
        border-radius:14px;

    }

    .card img{

        height:90px;

    }

    .card h2{

        font-size:13px;

    }

    .banner{

        height:180px;

    }

    .bannerText h1{

        font-size:18px;

    }

    .bannerText p{

        font-size:11px;

    }

    .content-area{

        padding:10px;

    }

}

@media(max-width:450px){

    #productList,
    #categoryProductList{

        grid-template-columns:
        repeat(2,1fr);

    }

    .card img{

        height:80px;

    }

}

/* ===========================
   SMOOTH SCROLL
=========================== */

html{

    scroll-behavior:smooth;

}

/* ===========================
   ADMIN INVENTORY GRID
=========================== */

.admin-inventory-grid{

    display:grid;

    grid-template-columns:
    repeat(auto-fill,minmax(220px,1fr));

    gap:20px;

}

.admin-product-card{

    background:white;

    padding:15px;

    border-radius:16px;

    box-shadow:
    0 5px 15px rgba(0,0,0,0.08);

}

.admin-product-card img{

    width:100%;
    height:120px;

    object-fit:contain;

}

.admin-actions{

    display:flex;

    gap:10px;

    margin-top:10px;

}

.edit-btn{

    flex:1;

    background:#df4b0b;

    color:white;

    border:none;

    padding:8px;

    border-radius:8px;

}

.delete-btn{

    flex:1;

    background:#e53935;

    color:white;

    border:none;

    padding:8px;

    border-radius:8px;

}
/* ===== BOTTOM NAVIGATION ===== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 75px;
  background: #ffffff;

  display: none;   /* Splash ke time hidden rahega */

  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  z-index: 1000;
  padding: 0 15px;
  box-sizing: border-box;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--inactive-color);
  cursor: pointer;
  position: relative;
  width: 75px;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-wrapper {
  font-size: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.nav-item span {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item.active .icon-wrapper {
  transform: translateY(-12px);
  background: rgba(0, 112, 74, 0.12);
  font-size: 22px;
}

.nav-item.active span {
  transform: translateY(-5px);
  font-weight: 700;
  opacity: 1;
}

.badge{
    position:absolute;
    top:-8px;
    right:-10px;
    background:red;
    color:white;
    font-size:10px;
    min-width:18px;
    height:18px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
}
#toast{
    position:fixed;
    bottom:100px;
    left:50%;
    transform:translateX(-50%);

    background:#28a745;
    color:#fff;

    padding:12px 20px;
    border-radius:50px;

    font-size:15px;
    font-weight:600;

    display:inline-block;

    width:fit-content;
    max-width:90%;

    white-space:nowrap;

    opacity:0;
    visibility:hidden;

    z-index:99999;
    transition:all .3s ease;
}

#toast.show{
    opacity:1;
    visibility:visible;
    bottom:120px;
}
/* ===== ADMIN LOGIN MODAL ===== */

.modal-overlay{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100vh;

    background:rgba(0,0,0,0.6);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:999999;
}

.modal-box{

    background:white;

    width:90%;
    max-width:350px;

    padding:25px;

    border-radius:20px;

    text-align:center;

    box-shadow:0 10px 30px rgba(0,0,0,0.3);

}

.modal-box h3{

    margin-bottom:10px;

}

.modal-box p{

    color:#666;
    margin-bottom:20px;

}

.modal-box input{

    width:100%;
    padding:12px;

    border:1px solid #ddd;

    border-radius:10px;

    margin-bottom:20px;

    font-size:15px;

}

.modal-buttons{

    display:flex;

    gap:10px;

}

.cancel-btn,
.login-btn{

    flex:1;

    border:none;

    padding:12px;

    border-radius:10px;

    cursor:pointer;

    font-weight:bold;

}

.cancel-btn{

    background:#eee;
    color:#333;

}

.login-btn{

    background:#df4b0b;
    color:white;

}