/*
Theme Name: Simple Shop
Theme URI: https://example.com/simple-shop
Author: NCERT Kaksha Style
Description: Ek simple, lightweight aur fast WooCommerce-ready ecommerce theme. Home page, Shop, Single Product, Cart aur Checkout (Billing) sab pages ke liye ready. WooCommerce plugin ke saath kaam karta hai.
Version: 1.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simple-shop
Tags: e-commerce, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===========================
   1. RESET & BASE
=========================== */
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #222;
  background: #f7f8f6;
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
img, svg, video, iframe, table { max-width: 100%; height: auto; display: block; }
table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
input, select, textarea, button { max-width: 100%; font-family: inherit; }
a { color: #1c8a4c; text-decoration: none; }
a:hover { color: #146a3a; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 12px; }
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
}
.btn, button, input[type="submit"], .button {
  display: inline-block;
  background: #1c8a4c;
  color: #fff !important;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: background .15s ease;
}
.btn:hover, button:hover, input[type="submit"]:hover, .button:hover { background: #146a3a; }
.btn-outline {
  background: #fff;
  color: #1c8a4c !important;
  border: 2px solid #1c8a4c;
}
.btn-outline:hover { background: #eafbef; }

/* ===========================
   2. HEADER
=========================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e7e7e3;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}
.site-branding { flex: 1 1 auto; min-width: 0; }
.site-branding a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-branding a {
  font-size: 24px;
  font-weight: 800;
  color: #171717;
}
.site-branding a span { color: #1c8a4c; }
.main-navigation ul {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.main-navigation a {
  color: #333;
  font-weight: 600;
  font-size: 15px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-icon-link {
  position: relative;
  display: flex;
  align-items: center;
  color: #222;
  font-size: 22px;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #1c8a4c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: #222;
  padding: 4px 8px;
}

/* ===========================
   3. HERO / HOMEPAGE
=========================== */
.hero {
  background: linear-gradient(135deg,#0f3d24,#1c8a4c);
  color: #fff;
  padding: 60px 0;
  text-align: center;
  border-radius: 0 0 26px 26px;
}
.hero h1 { font-size: 34px; margin-bottom: 10px; }
.hero p { font-size: 17px; opacity: .92; margin-bottom: 22px; }
.hero .btn { background: #fff; color: #146a3a !important; }
.hero .btn:hover { background: #eafbef; }

.section { padding: 46px 0; }
.section-title {
  text-align: center;
  font-size: 26px;
  margin-bottom: 28px;
}
.section-title span { display:block; font-size: 14px; color: #1c8a4c; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }

/* Featured categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.cat-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
  transition: box-shadow .15s ease, transform .15s ease;
}
.cat-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.08); transform: translateY(-3px); }
.cat-card img { border-radius: 8px; margin: 0 auto 10px; }
.cat-card h3 { font-size: 15px; margin: 0; }

/* ===========================
   4. PRODUCT GRID (Shop + Related)
=========================== */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  list-style: none;
}
ul.products li.product {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 14px;
  position: relative;
  transition: box-shadow .15s ease, transform .15s ease;
}
ul.products li.product:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,.09);
  transform: translateY(-3px);
}
ul.products li.product img {
  border-radius: 8px;
  margin-bottom: 10px;
  aspect-ratio: 1/1;
  object-fit: cover;
}
ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #222;
}
ul.products li.product .price {
  font-weight: 700;
  color: #1c8a4c;
  font-size: 16px;
}
ul.products li.product .price del { color: #999; font-weight: 400; margin-right: 6px; font-size: 13px; }
ul.products li.product .button {
  margin-top: 10px;
  width: 100%;
  text-align: center;
  padding: 10px;
  font-size: 14px;
}
ul.products li.product .onsale {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e63946;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
}
.star-rating { color: #f5a623; font-size: 13px; margin-bottom: 4px; }

/* ===========================
   5. SINGLE PRODUCT PAGE
=========================== */
.single-product .product {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  background: #fff;
  padding: 26px;
  border-radius: 14px;
  border: 1px solid #eee;
}
.single-product div.images { flex: 1 1 380px; }
.single-product div.summary { flex: 1 1 380px; }
.single-product .price { font-size: 26px; color: #1c8a4c; font-weight: 800; margin: 10px 0; }
.single-product .cart { margin: 18px 0; display: flex; gap: 10px; align-items: center; }
.single-product input.qty {
  width: 62px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  text-align: center;
}
.single-product table.shop_attributes { width: 100%; border-collapse: collapse; margin-top: 14px; }
.single-product table.shop_attributes th, .single-product table.shop_attributes td {
  padding: 8px 10px; border: 1px solid #eee; font-size: 14px;
}

/* Product Gallery - vertical layout, sabhi images par border */
.woocommerce-product-gallery__wrapper {
  margin: 0;
}
.woocommerce-product-gallery__image {
  border: 2px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  aspect-ratio: 1/1;
}
.woocommerce-product-gallery__image img {
  border: none;
  border-radius: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Lightbox image-counter (1/4 jaisa number) hide karo */
.pswp__counter { display: none !important; }
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  width: 100%;
}
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li {
  float: none;
  width: calc(25% - 8px);
  margin: 0;
}
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img {
  width: 100%;
  border: 2px solid #eee;
  border-radius: 8px;
  opacity: 1;
  cursor: pointer;
  transition: border-color .15s ease;
}
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img:hover {
  border-color: #1c8a4c;
}

/* ===========================
   6. CART PAGE
=========================== */
table.shop_table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}
table.shop_table th {
  background: #f1f6f2;
  text-align: left;
  padding: 12px;
  font-size: 14px;
}
table.shop_table td {
  padding: 12px;
  border-top: 1px solid #f0f0f0;
  vertical-align: middle;
}
.cart-collaterals .cart_totals {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}
.cart_totals table { width: 100%; }
.cart_totals .order-total .amount { color: #1c8a4c; font-weight: 800; font-size: 18px; }
#coupon_code { padding: 10px; border-radius: 8px; border: 1px solid #ddd; margin-right: 8px; }

/* ===========================
   7. CHECKOUT / BILLING PAGE
=========================== */
.woocommerce-checkout form .form-row { margin-bottom: 14px; }
.woocommerce-checkout input.input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}
#customer_details, #order_review {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 22px;
}
#order_review { margin-top: 24px; }
.woocommerce-checkout-review-order-table { width: 100%; }
.woocommerce-checkout #payment {
  background: #f5faf6;
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
}
.woocommerce-checkout #payment ul.payment_methods { margin-bottom: 10px; }
#place_order { width: 100%; padding: 15px; font-size: 16px; margin-top: 10px; }

/* ===========================
   8. GENERIC PAGE / CONTENT
=========================== */
.site-main { padding: 34px 0 50px; min-height: 300px; }
.page-title { font-size: 28px; margin-bottom: 18px; }
.entry-content { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #eee; }

/* Breadcrumb */
.woocommerce-breadcrumb {
  font-size: 13px;
  color: #777;
  margin-bottom: 18px;
}
.woocommerce-breadcrumb a { color: #777; }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  background: #eafbef;
  border-left: 4px solid #1c8a4c;
  padding: 14px 18px;
  border-radius: 8px;
  list-style: none;
  margin-bottom: 20px;
}
.woocommerce-error { background: #fdecec; border-left-color: #e63946; }

/* ===========================
   9. FOOTER
=========================== */
.site-footer {
  background: #14231a;
  color: #cfe5d8;
  padding: 40px 0 20px;
  margin-top: 50px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 26px;
  margin-bottom: 22px;
}
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-footer a { color: #cfe5d8; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
  text-align: center;
  font-size: 13px;
  color: #9fb8ab;
}

/* ===========================
   10. RESPONSIVE
=========================== */
/* ===========================
   11. WOOCOMMERCE ELEMENTS
   (theme's own default-WC-CSS replacement,
   ab ki default WooCommerce stylesheet nikaal di hai taaki
   do CSS files aapas me clash na karein)
=========================== */
.quantity { display: inline-flex; align-items: center; }
.quantity .qty { text-align: center; }

.woocommerce-tabs { margin-top: 30px; width: 100%; }
.woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 2px solid #eee;
  margin-bottom: 18px;
}
.woocommerce-tabs ul.tabs li {
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  background: #f1f6f2;
}
.woocommerce-tabs ul.tabs li.active { background: #1c8a4c; color: #fff; }
.woocommerce-tabs ul.tabs li.active a { color: #fff; }
.woocommerce-tabs .panel { background: #fff; padding: 4px 2px; }

table.variations { width: 100%; margin-bottom: 14px; }
table.variations td { padding: 6px 0; }
table.variations select {
  width: 100%;
  max-width: 320px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.woocommerce-variation-price .price { font-size: 22px; }
a.reset_variations { display: inline-block; margin-top: 6px; font-size: 13px; }

.product_meta { margin-top: 18px; font-size: 14px; color: #666; }
.product_meta > span { display: block; margin-bottom: 4px; }

.woocommerce-product-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.woocommerce-form-login,
.woocommerce-form-register,
.woocommerce-form-coupon,
.woocommerce-ResetPassword {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 22px;
  max-width: 480px;
}
.woocommerce-form-login .form-row label,
.woocommerce-form-register .form-row label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.woocommerce-form-login .form-row,
.woocommerce-form-register .form-row,
.woocommerce-form-coupon .form-row { margin-bottom: 14px; }
.woocommerce-form-login__rememberme { display: flex; align-items: center; gap: 6px; width: auto; }

.woocommerce-MyAccount-navigation ul { border: 1px solid #eee; border-radius: 12px; overflow: hidden; background: #fff; }
.woocommerce-MyAccount-navigation li { border-bottom: 1px solid #f0f0f0; }
.woocommerce-MyAccount-navigation li:last-child { border-bottom: none; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; font-weight: 600; }
.woocommerce-MyAccount-navigation li.is-active a { color: #1c8a4c; background: #f1f6f2; }
.woocommerce-MyAccount-content { margin-top: 20px; }
.woocommerce-account .woocommerce { display: flex; flex-wrap: wrap; gap: 26px; }
.woocommerce-account .woocommerce-MyAccount-navigation { flex: 0 0 220px; }
.woocommerce-account .woocommerce-MyAccount-content { flex: 1 1 320px; margin-top: 0; }

mark.count { color: #1c8a4c; }
.added_to_cart { margin-left: 10px; font-size: 13px; font-weight: 700; }

.woocommerce-result-count, .woocommerce-ordering { font-size: 14px; margin-bottom: 16px; }
.woocommerce-ordering select { padding: 8px 10px; border-radius: 6px; border: 1px solid #ddd; }

.select2-container { max-width: 100%; }

/* ===========================
   11b. PRODUCT REVIEWS (proper card style, blog comment jaisa nahi)
=========================== */
#reviews #comments { margin-top: 10px; }
#reviews h2 { font-size: 20px; margin-bottom: 18px; }
#reviews h2 .woocommerce-review-count { color: #777; font-weight: 400; font-size: 15px; }

#reviews ol.commentlist {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#reviews li.comment {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px 18px;
}
#reviews .comment_container { display: flex; gap: 14px; align-items: flex-start; }
#reviews .comment_container img.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
}
#reviews .comment-text { flex: 1 1 auto; min-width: 0; }
#reviews .comment-text .star-rating {
  margin-bottom: 6px;
  font-size: 15px;
  color: #f5a623;
}
#reviews .woocommerce-review__author {
  font-weight: 700;
  font-size: 14px;
  color: #222;
}
#reviews .woocommerce-review__dash { color: #ccc; margin: 0 4px; }
#reviews .woocommerce-review__published-date {
  font-size: 12px;
  color: #999;
}
#reviews .description p { margin: 8px 0 0; font-size: 14px; color: #444; }
#reviews li.comment .reply { display: none; }

/* Review / rate form */
#review_form_wrapper {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
}
#review_form #reply-title { font-size: 17px; margin-bottom: 14px; }
.comment-form-rating { margin-bottom: 14px; }
.comment-form-rating label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
#review_form p.comment-form-comment label,
#review_form p.comment-form-author label,
#review_form p.comment-form-email label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
#review_form textarea, #review_form input[type="text"], #review_form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
#review_form textarea { min-height: 110px; }
.woocommerce-noreviews { color: #777; font-size: 14px; }

@media (max-width: 480px) {
  #reviews .comment_container { gap: 10px; }
  #reviews .comment_container img.avatar { width: 38px; height: 38px; }
}

/* ===========================
   12. RESPONSIVE / MOBILE FIT FIX
=========================== */
@media (max-width: 780px) {
  .menu-toggle { display: block; }
  .main-navigation { display: none; width: 100%; order: 3; }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; gap: 0; }
  .main-navigation ul li a { display: block; padding: 10px 0; border-top: 1px solid #eee; }
  .header-inner { position: relative; }
  .hero { padding: 40px 0; border-radius: 0 0 16px 16px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 15px; }
  .section { padding: 30px 0; }
  ul.products { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
  .single-product .product { padding: 16px; gap: 20px; }
  .cart-collaterals .cart_totals { padding: 16px; }
  #customer_details, #order_review { padding: 16px; }
  .woocommerce-account .woocommerce { flex-direction: column; }
  .woocommerce-account .woocommerce-MyAccount-navigation { flex: 1 1 auto; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .site-branding a { font-size: 20px; }
  .header-inner { padding: 10px 0; gap: 10px; }
  .header-actions { gap: 12px; }
  .header-icon-link { font-size: 20px; }
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  ul.products li.product { padding: 10px; }
  .hero h1 { font-size: 20px; }
  table.shop_table th, table.shop_table td { padding: 8px; font-size: 13px; }
}
