/*
Theme Name: JalansEcommerce
Author: username
Author URI: 
Theme URI: 
Tags: full-site-editing, block-patterns
Text Domain: jalansecommerce
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Version: 100.0

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Styles intended only for the front.*/
html {
	scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

a:hover {
  color: #2ecc71;
  text-decoration: underline;
} 


.fade-in {
  animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
} 

/* Latest News Post Style */
.wp-block-post {
  background: #f8f8f8;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Post Title */
.wp-block-post-title a {
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
  text-decoration: none;
}

.wp-block-post-title a:hover {
  color: #4989f7;
}

/* Post excerpt */
.wp-block-post-excerpt {
  color: #555;
  margin-top: 10px;
}

/* Date */
.wp-block-post-date {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
} 



/* Product Card */
.wc-block-product {
  padding: 24px; /* more space inside */
  border-radius: 16px;
}

/* Hover = subtle lift */
.wc-block-product:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

.wc-block-product img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

/* Title */
.wc-block-product__title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 8px 0;
  line-height: 1.4;
} 

.wp-block-woocommerce-product-collection {
  max-width: 1200px;
  margin: 0 auto;
}

/* Price */
.wc-block-product__price {
  color: #16a34a; /* nicer green */
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.wc-block-product__add-to-cart .wp-block-button__link {
  width: 100%;
  text-align: center;
  background: #16a34a;
  color: white;
  border-radius: 8px;
  padding: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* Hover */
.wc-block-product__add-to-cart .wp-block-button__link:hover {
  background: #15803d;
  transform: scale(1.02);
}
.about-section {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 1.1rem;
  color: #444;
} 

.wc-block-product {
  backdrop-filter: blur(6px);
}

.about-section img {
  border-radius: 10px;
  margin: 20px 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
} 

.wp-block-navigation a {
    text-decoration: none;
}

/* Add underline only on hover */
.wp-block-navigation a:hover {
    text-decoration: underline;
} 

.contact-form-7 {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* optional: better than full center */
  padding-top: 80px;
  height: 100vh;
}

.contact-form-7 form {
  width: 100%;
  max-width: 600px;
}

.contact-form-7 input,
.contact-form-7 textarea {
  width: 100%;
}  

/* Cover promo section */
.wp-block-cover.promo-banner {
  border-radius: 18px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  padding: 40px;
}

/* Dark overlay for readability */
.wp-block-cover.promo-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
} 

/* Content wrapper */
.wp-block-cover.promo-banner .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

/* Heading */
.wp-block-cover.promo-banner h2 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
}

/* Text */
.wp-block-cover.promo-banner p {
  color: #f9fafb; /* slightly softer than pure white */
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.6;
  font-family: "Inter", sans-serif;
  /*  THIS is the glow/shadow effect */
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);

  /*  subtle polish */
  letter-spacing: 0.2px;
} 

/* COUPON BLOCK WRAPPER */
.wc-block-components-totals-coupon {
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 20px;
  margin-top: 20px;
}

/* COUPON LABEL */
.wc-block-components-totals-coupon label {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: #1a1a1a;
}

/* INPUT FIELD */
.wc-block-components-totals-coupon input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

/* Focus state */
.wc-block-components-totals-coupon input:focus {
  border-color: #16a34a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

/* =========================
   APPLY BUTTON
========================= */
.wc-block-components-totals-coupon button {
  margin-top: 12px;
  width: 100%;
  background: #16a34a;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover */
.wc-block-components-totals-coupon button:hover {
  background: #15803d;
  transform: translateY(-1px);
}

/* 
   SUCCESS MESSAGE */
.wc-block-components-totals-coupon .wc-block-components-notice-banner {
  border-radius: 8px;
  margin-top: 10px;
  font-size: 0.9rem;
}

/* =========================
   APPLIED COUPON STYLE
========================= */
.wc-block-components-totals-coupon__list-item {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
  font-weight: 500;
  color: #166534;
}

/* Remove coupon button (X) */
.wc-block-components-totals-coupon__remove {
  color: #dc2626;
  margin-left: 10px;
  cursor: pointer;
}



.wp-block-cover.promo-banner::before {
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.7),
    rgba(0,0,0,0.2)
  );
} 

.wp-block-cover.promo-banner {
  text-align: center;
}

/* RESET MEDIA & TEXT PROPERLY */
.wp-block-media-text {
  max-width: 1000px;
  margin: 0 auto 60px auto; /* centers the block */
  align-items: center;
}

/* FIX TEXT COLUMN WIDTH */
.wp-block-media-text__content {
   text-align: left; /* keep paragraphs readable */
  margin: 0 auto;
}

/* FIX IMAGE SO IT DOESN'T BREAK LAYOUT */
.wp-block-media-text__media img {
  width: 100%;
  height: auto;
  display: block;
}

/* Heading inside block */
.wp-block-media-text__content h2,
.wp-block-media-text__content h3 {
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #1a1a1a;
}

/* Paragraph inside media block */
.wp-block-media-text__content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4b5563;
} 

/* =========================
   PARAGRAPH TEXT
========================= */
.wp-block-post-content p {
  font-family: "Inter", sans-serif;
  font-size: 1.08rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 18px;
  max-width: 700px; /* keeps text readable */
}

/* Optional: center content nicely */
.wp-block-post-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
} 

.wp-block-media-text + p {
  margin-top: 20px;
} 

.wp-block-post-content strong {
  color: #111827;
  font-weight: 600;
}   

/* Login Form Container */
.login-form-wrapper {
  max-width: 420px;
  margin: 60px auto;
}

/* Links (forgot password, etc.) */
.login-form-wrapper a {
  color: #4989f7;
  text-decoration: none;
  font-size: 1.9rem;
  font-weight: 500;
  position: relative;
  transition: all 0.2s ease;
}

/* Smooth underline animation */
.login-form-wrapper a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: #4989f7;
  transition: width 0.25s ease;
}

/* Hover effect */
.login-form-wrapper a:hover {
  color: #2f6fe4;
}

.login-form-wrapper a:hover::after {
  width: 100%;
}

/* Optional: subtle spacing for "Forgot password" etc */
.login-form-wrapper .login-links {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Banner Button Style */
.wp-block-cover .wp-block-button__link {
  display: inline-block;
  width: auto;              /* stops full stretch */
  min-width: 180px;         /* keeps it solid */
  padding: 16px 32px;       /* taller + nicer */
  border-radius: 999px;
  font-size: 16px;
  text-align: center;
}

/* Hover effect */
.wp-block-cover .wp-block-button__link:hover {
  color: #ffffff;
  background: transparent;
  border: 2px solid #ffffff;
}

/* Glow animation layer */
.wp-block-cover .wp-block-button__link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.6),
    transparent
  );
  transition: all 0.6s ease;
}

/* Slide shine effect */
.wp-block-cover .wp-block-button__link:hover::before {
  left: 100%;
}

.wp-block-cover {
  margin-top: 0 !important;
} 

.wp-site-blocks > *:first-child {
  margin-top: 0 !important;
} 

.wp-block-button {
  text-align: left; /* or center if you want */
}

.wp-block-button__link {
  width: auto !important;
} 

header {
  margin-bottom: 0 !important; 
  padding-top: 0% !important;
}

.wp-block-cover:first-of-type {
  margin-top: 0 !important;
} 

/* Remove spacing between header and first cover */
header + .wp-site-blocks .wp-block-cover:first-of-type {
  margin-top: 0 !important;
}

/* Remove spacing from the container holding it */
.wp-site-blocks {
  gap: 0 !important;
}

/* Remove default cover spacing */
.wp-block-cover {
  margin-block-start: 0 !important;
}

/* Remove group spacing just in case */
.wp-block-group {
  margin-top: 0 !important;
} 
 
/* Base button */
.wp-block-cover .wp-block-button__link {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none !important; /* remove underline */
  
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  border: 1px solid rgba(255,255,255,0.25);
  
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.wp-block-cover .wp-block-button__link {
  display: inline-block;
  padding: 20px 48px;      /* bigger size */
  border-radius: 999px;
  font-size: 18px;         /* larger text */
  font-weight: 600;
  color: #ffffff;
  text-decoration: none !important;

  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255,255,255,0.25);

  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Glow layer */
.wp-block-cover .wp-block-button__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.3), transparent 60%);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* Hover */
.wp-block-cover .wp-block-button__link:hover {
  transform: translateY(-4px) scale(1.05);
  background: #ffffff;
  color: #111;
  text-decoration: none !important;

  box-shadow: 
    0 14px 35px rgba(0,0,0,0.25),
    0 0 30px rgba(255,255,255,0.4);
}

/* Click */
.wp-block-cover .wp-block-button__link:active {
  transform: translateY(0px) scale(0.97);
} 


.wc-block-components-product-badge {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  width: auto !important;        
  display: inline-block !important;
  color: #fff !important;
  font-size: 20px;
  font-weight: 700;
  padding: 6px 12px;
  

  text-transform: uppercase;
  letter-spacing: 0.5px;
  transform: rotate(-5deg);
  box-shadow: 0 20px 15px rgba(0, 0, 0, 0.6);

  z-index: 5;
} 

/* Make sure product card allows absolute positioning */
.wc-block-grid__product {
  position: relative;
} 

/* Gadgets Grid */
.gadgets-loop .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card */
.gadgets-loop .wp-block-post {
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  transition: 0.25s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.gadgets-loop .wp-block-post:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

/* Image */
.gadgets-loop .wp-block-post-featured-image img {
  border-radius: 10px;
  height: 180px;
  object-fit: cover;
}

/* Title */
.gadgets-loop .wp-block-post-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 10px;
}

/* TABLET (≤ 900px)*/
@media (max-width: 900px) {

  /* Product grid → 2 columns */
  .wc-block-product-template {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Media & Text stack */
  .wp-block-media-text {
    grid-template-columns: 1fr !important;
    gap: 20px;
    text-align: center;
  }

  .wp-block-media-text__content {
    text-align: center;
  }

  /* Banner text */
  .wp-block-cover h1,
  .wp-block-cover h2 {
    font-size: 2rem;
  }

  .wp-block-cover p {
    font-size: 1rem;
  }

  /* Button slightly smaller */
  .wp-block-cover .wp-block-button__link {
    padding: 16px 32px;
    font-size: 16px;
  }

  /* Navigation spacing */
  .wp-block-navigation {
    gap: 16px;
  } 

  /* Product image wrapper */
  .wc-block-product img {
    width: 100%;
    height: 160px !important;   
    object-fit: contain;        
    padding: 10px;              
    background: #fff;         
    border-radius: 10px;
  }

  /* Reduce product card padding */
  .wc-block-product {
    padding: 12px !important;
  }

  /* Tighten spacing overall */
  .wc-block-product__title {
    font-size: 0.95rem;
  }

  .wc-block-product__price {
    font-size: 1rem;
  }
}

/* 
   MOBILE (≤ 600px) */
@media (max-width: 600px) {

  /* FORCE product grid to 1 column */
  .wc-block-product-template {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Fix individual product width */
  .wc-block-grid__product {
    width: 100% !important;
    margin: 0 !important;
  }

  /* Product card spacing */
  .wc-block-product {
    padding: 16px;
  }

  /* Product image */
  .wc-block-product img {
    height: 180px;
    object-fit: cover;
  }

  /* SALE badge scale down */
  .wc-block-components-product-badge {
    font-size: 12px;
    padding: 5px 10px;
    top: 8px !important;
    left: 8px !important;
  }

  /* Banner fix */
  .wp-block-cover.promo-banner {
    padding: 20px;
    min-height: 240px;
  }

  /* Headings */
  .wp-block-cover h1,
  .wp-block-cover h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  /* Text */
  .wp-block-cover p {
    font-size: 0.95rem;
  }

  /* Button */
  .wp-block-cover .wp-block-button__link {
    padding: 14px 24px;
    font-size: 15px;
    width: auto;
  }

  /* Media & text stack */
  .wp-block-media-text {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .wp-block-media-text__content {
    text-align: center;
  }

  /* Login form */
  .login-form-wrapper {
    padding: 20px;
    margin: 30px auto;
  }

  /* About */
  .about-section {
    font-size: 1rem;
    padding: 0 15px;
  } 
  .wp-block-query {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .wp-block-post {
    width: 100%;
  }

  .wp-block-post-title {
    font-size: 18px;
  }

  .wp-block-image img {
    width: 100%;
    height: auto;
  } 

   .best-seller,
  .badge,
  .wp-block-image .badge {
    position: static;
    display: block;
    margin: 10px auto;
  }

}