/* made custom variables for global use*/
:root {
  --primary-color: #1AC073;
  --secondary-green: #2EBF91;
  --light-bg-color: #F0FAF7;
  --accent-yellow: #F3BA00;
  --light-gray: #F2F2F2;
  --section-bg-gray: #F7F8FA;
  --info-bg-top: #FAFAFA;
  --info-bg-bottom: #C7EACC;
  /* Standard colors */
  --text-dark: #1F2937;
  --text-light: #6B7280;
  --white: #FFFFFF;
  --shadow-color: rgba(0, 0, 0, 0.1);
}
/* resetting krdiya */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* entire page */
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--white);
}

body.body-no-scroll {
  overflow: hidden;
}
/* center content krdiya and maximum width dedi top the container*/
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* no extra space below the image*/
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Open Sans', sans-serif;
}

/* Header */
.main-header {
  background-color: var(--primary-color);
  color: var(--white);
  height: 80px;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(240, 250, 247, 0.2);
  padding-bottom: 20px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  gap: 40px;
}

.main-nav a {
  font-weight: 600;
  transition: opacity 0.3s;
}

.main-nav a:hover {
  opacity: 0.8;
}

.header-actions {
  display: flex;
  gap: 15px;
}

.search-btn,
.cart-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  background: var(--primary-color);
  color: var(--white);
  min-height: calc(800px - 80px); /* 800 total - headers height*/ 
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.hero-text {
  flex: 1;
  max-width: 540px;
}

.hero-text h1 {
  font-size: 60px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-text p {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 450px;
}

.search-container {
  display: flex;
  max-width: 450px;
  height: 56px;
}

.search-container input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 16px;
  outline: none;
  background-color: var(--white);
  color: var(--text-dark);
}

.search-button {
  padding: 0 25px;
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  font-weight: 700;
  border: none;
  transition: background-color 0.3s;
  border-radius: 0 8px 8px 0;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Section General Styles */
section {
  padding: 80px 0;
}

.home-kitchen, .popular-items {
  background-color: var(--section-bg-gray);
}

h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.section-title.text-center {
  text-align: center;
}

/* Food Grid & Card Styles */
.food-grid { /* minimum set krdi width with responsiveness */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.food-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--light-gray);
}

.food-card:hover {
    transform: translateY(-8px); /* lifting the card slightly up on hover*/
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.food-image {
  position: relative;
  height: 200px;
}

.food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;/* covers fully*/
}

.discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.food-details {
  padding: 20px;
}

.food-title-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.food-name {
  font-weight: 700;
  font-size: 18px;
}

.food-price {
  font-weight: 700;
  font-size: 16px;
}

.food-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dark);
  background-color: var(--light-gray);
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 600;
}

.time {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-light);
}

.rating svg {
  fill: var(--accent-yellow);
  stroke: var(--accent-yellow);
}

.add-btn {
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.add-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-dark);
  stroke-width: 3;
}

.quantity-control {
  position: relative;
  width: 90px;
  height: 32px;
}

.quantity-control .add-btn {
  position: absolute; /* to hide it when counter shows up */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
}

.quantity-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  background-color: var(--accent-yellow);
  border-radius: 8px;
  color: var(--text-dark);
  font-weight: 700;
  overflow: hidden;
}

.quantity-btn {
  width: 30px;
  height: 100%;
  font-size: 18px;
  line-height: 1;
  color: var(--text-dark);
  font-weight: 700;
}

.quantity-btn:hover {
  background-color: rgba(0,0,0,0.1);
}

/* Carousel */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.carousel-items {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex: 1;
}

.carousel-items::-webkit-scrollbar {
  display: none; /* hiding the scrollbar from the browser*/
}

.carousel-items .food-card {
  flex: 0 0 300px;
}

.carousel-arrow {
  background-color: var(--primary-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px var(--shadow-color);
  transition: background-color 0.3s, transform 0.3s;
  z-index: 10; /* to get it on top of items */
}
.carousel-arrow:hover {
  background-color: var(--secondary-green);
  transform: scale(1.1);
}

.carousel-arrow.prev {
  margin-right: -24px;
}

.carousel-arrow.next {
  margin-left: -24px;
}

.carousel-arrow:disabled { /* disabling the buttons at the start and end of carousel */
  opacity: 0.4;
  cursor: not-allowed;
  transform: scale(1);
}

/* Request Dish Button */
.request-dish {
  text-align: center;
  margin-top: 30px;
}

.request-dish-btn {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 14px 35px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.3s;
}
.request-dish-btn:hover {
  background-color: var(--secondary-green);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* on top of everything */
}

.modal-content {
  background-color: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.modal-title {
  margin-bottom: 25px;
  font-size: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
}
.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background-color: var(--white);
}
.form-group input:focus {
  border-color: var(--primary-color);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
}

.cancel-btn, .submit-request-btn {
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
  border: 1px solid var(--light-gray);
}
.cancel-btn {
    background-color: var(--white);
    color: var(--text-light);
}
.cancel-btn:hover {
  background-color: var(--light-gray);
}

.submit-request-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}
.submit-request-btn:hover {
  background-color: var(--secondary-green);
}

/* Home Delivery Info & Video */
.home-delivery-info {/* from top ->bottom, till 60% and then 60% to 100% */
  background: linear-gradient(to bottom, var(--info-bg-top) 60%, var(--info-bg-bottom) 60%);
  padding-top: 80px;
  padding-bottom: 100px;
}

.info-content {
  text-align: center;
}

.info-text h1 {
  font-size: 40px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.info-text p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 50px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.video-player-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  padding-top: 56.25%;
}

#youtube-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.play-pause-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* centers the button  */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10;
}

.video-player-wrapper:hover .play-pause-btn {
  transform: translate(-50%, -50%) scale(1.1);
}
/* hides the button when video plays */
.video-player-wrapper.playing .play-pause-btn {
  opacity: 0;
}

/* Contact Section */
.contact-section {
  background-color: var(--section-bg-gray);
}

.contact-content {
  display: flex;
  align-items: center;
  gap: 80px;
  background-color: var(--section-bg-gray);
  padding: 60px;
  border-radius: 12px;
}
.contact-form-wrapper {
  flex: 1.2;
}
.contact-form-wrapper h2 {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 15px;
}
.contact-form-wrapper p {
  color: var(--text-light);
  margin-bottom: 30px;
}
.form-row {
  display: flex;
  gap: 20px;
}
.form-row .form-group {
  flex: 1;
}
.form-group textarea {
  height: 120px;
  resize: vertical;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 20px;
    border: none;
    background-color: var(--white);
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.contact-section .form-group label {
  display: none;
}

.submit-form-btn {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 14px 35px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.3s;
  margin-top: 10px;
}
.submit-form-btn:hover {
    background-color: var(--secondary-green);
}

.contact-image {
  flex: 1;
  display: flex;
  justify-content: center;
}
.contact-image img {
  max-width: 90%;
}

/* Footer */
.main-footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 20px 0;
}

.footer-content {
  height: 97px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(240, 250, 247, 0.2);
}

.footer-menu ul {
  display: flex;
  gap: 30px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  color: var(--white);
  transition: transform 0.3s;
}
.social-link:hover {
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 1024px) { /* tablets and desktops */
  h2 { font-size: 32px; }
  .hero-content { flex-direction: column; text-align: center; } /* stacks */
  .hero-text { max-width: 100%; align-items: center; display: flex; flex-direction: column; }
  .contact-content { flex-direction: column; }
  .contact-image { order: -1; margin-bottom: 40px; } /* moved image on the top when shrinked*/
}
/* mobile phones*/
@media (max-width: 768px) { /* stacking everything lol */
  section { padding: 60px 0; }
  .header-container, .main-nav ul, .footer-content { flex-direction: column; gap: 20px; }
  .main-header, .footer-content { height: auto; padding: 20px 0; }
  .hero-text h1 { font-size: 40px; }
  .info-text h1 { font-size: 32px; }
  .form-row { flex-direction: column; gap: 20px; }
}