/* RiyaStore.shop - Main Stylesheet */

:root {
  --primary-color: #4CAF50;
  --secondary-color: #FF9800;
  --accent-color: #2196F3;
  --text-color: #333;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #757575;
  --white: #ffffff;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-gray);
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: relative;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo span {
  color: var(--secondary-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  margin: 0 20px;
}

.nav-menu li {
  margin-left: 20px;
}

.nav-menu a {
  color: var(--text-color);
  font-weight: 500;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.cart-icon {
  position: relative;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--secondary-color);
  color: var(--white);
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* Hero Section */
.hero {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
}

.search-bar {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
}

.search-bar input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: 1rem;
}

.search-bar button {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 0 20px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background-color: #e68a00;
}

/* Categories Section */
.categories {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8rem;
  color: var(--primary-color);
}

.category-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.category-item {
  background-color: var(--white);
  padding: 10px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.category-item:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.category-item.active {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Products Section */
.products {
  padding: 40px 0;
}

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

.product-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.product-info {
  padding: 15px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.product-price {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
}

.product-description {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin-bottom: 15px;
}

.add-to-cart {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  margin-top: 10px;
  width: 100%;
}

.add-to-cart:hover {
  background-color: #3d8b40;
}

.add-to-cart.in-cart {
  background-color: var(--secondary-color);
  position: relative;
}

.add-to-cart.in-cart:hover {
  background-color: #e67e22;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--white);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--medium-gray);
}

.cart-title {
  font-size: 1.3rem;
  font-weight: 600;
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

.cart-items {
  padding: 20px;
}

.cart-item {
  display: flex;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--medium-gray);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.cart-item-details {
  flex: 1;
  padding: 0 15px;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.cart-item-price {
  color: var(--primary-color);
  font-weight: 600;
}

.cart-item-actions {
  display: flex;
  align-items: center;
}

.quantity-control {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.quantity-btn {
  background-color: var(--medium-gray);
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.quantity {
  margin: 0 10px;
  font-weight: 600;
}

.remove-item {
  background: none;
  border: none;
  color: #f44336;
  cursor: pointer;
  margin-left: 10px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--medium-gray);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
}

.checkout-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: var(--border-radius);
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.checkout-btn:hover {
  background-color: #3d8b40;
}

.empty-cart {
  text-align: center;
  padding: 30px 0;
}

.empty-cart p {
  margin-bottom: 20px;
  color: var(--dark-gray);
}

.continue-shopping {
  color: var(--primary-color);
  font-weight: 600;
}

/* Checkout Page */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 40px 0;
}

.checkout-form {
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.payment-methods {
  margin-top: 20px;
}

.payment-method {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.payment-method input {
  margin-right: 10px;
}

.order-summary {
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--medium-gray);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.place-order-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: var(--border-radius);
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 20px;
}

.place-order-btn:hover {
  background-color: #3d8b40;
}

/* Footer */
footer {
  background-color: var(--text-color);
  color: var(--white);
  padding: 40px 0 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--white);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

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

.social-links a {
  color: var(--white);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .checkout-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    padding: 15px 20px;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 15px;
    order: 3;
    border-top: 1px solid var(--medium-gray);
    padding-top: 10px;
  }
  
  .nav-menu.show {
    display: flex;
  }
  
  .nav-menu li {
    margin: 10px 0;
    margin-left: 0;
    width: 100%;
  }
  
  .nav-menu a {
    display: block;
    padding: 8px 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 576px) {
  .header-container {
    padding: 10px 15px;
  }
  
  .logo {
    font-size: 1.3rem;
    max-width: 70%;
  }
  
  .header-actions {
    gap: 15px;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .cart-sidebar {
    max-width: 100%;
  }
  
  .search-bar {
    flex-direction: column;
  }
  
  .search-bar input {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin-bottom: 1px;
  }
  
  .search-bar button {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 12px;
  }
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.overlay.show {
  display: block;
}

/* Success Message */
.success-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  z-index: 1001;
  transform: translateX(150%);
  transition: transform 0.3s ease;
}

.success-message.show {
  transform: translateX(0);
}

/* Payment QR Codes */
.payment-qr {
  display: none;
  margin-top: 15px;
}

.payment-qr img {
  max-width: 200px;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
} 