/* style.css */
:root {
  --col-yellow: #FFC107;
  --col-green: #00C853;
  --col-orange: #FF6D00;
  --col-blue: #29B6F6;
  --col-dark: #1F2937;
  --col-gray: #F3F4F6;
  --col-white: #FFFFFF;
  
  --radius: 20px;
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  --container: 1200px;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background-color: var(--col-gray);
  color: var(--col-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.site-header {
  background: var(--col-white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 25px;
  justify-content: space-between;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 50px;
  display: block;
  width: auto;
}

.search-container {
  flex: 1;
  max-width: 500px;
  min-width: 200px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 14px 12px 14px 45px;
  border: 2px solid #E5E7EB;
  border-radius: 50px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
  background: #F9FAFB;
  box-sizing: border-box; 
}

.search-box input:focus {
  border-color: var(--col-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(41, 182, 246, 0.1);
}

.tag-bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 20px 0;
}

.tag-text {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  font-weight: 600;
}

main {
  padding: 30px 20px 60px;
}

.product-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.loader {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: #999;
  font-weight: 600;
}

.load-more-btn {
  display: block;
  margin: 30px auto;
  padding: 12px 30px;
  background: var(--col-blue);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 200px;
  width: 100%;
}

.load-more-btn:hover:not(:disabled) {
  background: #1a8fd8;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.load-more-btn:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  transform: none;
}

.card {
  background: var(--col-white);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f4f4f4;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.sale-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--col-orange);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--col-dark);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.card-price {
  font-weight: 800;
  font-size: 16px;
  color: var(--col-green);
}

.card-old-price {
  text-decoration: line-through;
  color: #9CA3AF;
  font-size: 13px;
}

.btn-card {
  margin-top: 12px;
  background: var(--col-dark);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-card:hover {
  background: #000;
}

.product-card {
  background: #fff;
  max-width: 800px;
  margin: 20px auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.product-body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.product-image-wrapper {
  flex: 1;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  flex-grow: 1;
}

.product-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
}

.product-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s;
}

.product-thumb:hover,
.product-thumb.active {
  border-color: var(--col-blue);
}

.sale-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--col-orange);
  color: #fff;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
}

.product-details {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.current-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--col-green);
}

.old-price {
  font-size: 16px;
  text-decoration: line-through;
  color: #999;
}

.stock-status.in-stock {
  background: #E8F5E9 !important;
  color: #2E7D32 !important;
}

.stock-status.out-of-stock {
  background: #FFEBEE !important;
  color: #D32F2F !important;
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  align-self: flex-start;
}

.product-scroll-desc {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 10px;
}

.product-scroll-desc::-webkit-scrollbar {
  width: 6px;
}

.product-scroll-desc::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

/* FIXED DESCRIPTION STYLING */
.product-description {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin: 0;
  padding: 0;
}

/* Proper paragraph spacing for Shopify content */
.product-description p {
  margin: 0 0 1em 0;
  line-height: 1.6;
}

.product-description p:last-child {
  margin-bottom: 0;
}

/* Style lists properly */
.product-description ul,
.product-description ol {
  margin: 1em 0;
  padding-left: 1.5em;
  list-style-position: outside;
}

.product-description li {
  margin-bottom: 0.5em;
  line-height: 1.5;
}

/* Style strong and em tags */
.product-description strong {
  font-weight: 700;
  color: #333;
}

.product-description em {
  font-style: italic;
}

/* Handle any <br> or extra whitespace */
.product-description br {
  content: "";
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.1s, opacity 0.2s;
  cursor: pointer;
  border: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: #25D366;
  color: #fff;
}
.btn-primary:hover { background: #1ebc57; }

.btn-secondary {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
}
.btn-secondary:hover { opacity: 0.9; }

.btn-primary:disabled {
  background: #cccccc !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

.related-section {
  max-width: var(--container);
  margin: 60px auto 0;
  padding: 0 20px;
  border-top: 1px solid #eee;
  padding-top: 40px;
}

.related-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.site-footer {
  background: var(--col-white);
  padding: 40px 20px;
  margin-top: 40px;
  border-top: 1px solid #eee;
  text-align: center;
}

.footer-content h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: #444;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-decoration: none;
  font-size: 20px;
  transition: all 0.2s;
}

.social-btn:hover { transform: translateY(-3px); color: #fff; }
.social-btn.insta:hover { background: #E1306C; }
.social-btn.fb:hover { background: #1877F2; }
.social-btn.tiktok:hover { background: #000; }
.social-btn.yt:hover { background: #FF0000; }
.social-btn.wa:hover { background: #25D366; }

.copyright {
  font-size: 12px;
  color: #888;
}

@media (max-width: 768px) {
  .header-inner { 
    flex-wrap: wrap; 
    gap: 15px;
    padding: 0 15px;
  }
  
  .logo img { 
    height: 42px;
  }
  
  .search-container { 
    order: 3; 
    width: 100%; 
    max-width: 100%; 
    min-width: unset;
  }
  
  .search-box input {
    padding: 12px 12px 12px 45px;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .card-content {
    padding: 12px;
  }
  
  .card-title {
    font-size: 14px;
  }
  
  .product-body { 
    flex-direction: column; 
  }
  
  .product-image-wrapper { 
    height: auto; 
  }
  
  .product-details { 
    padding: 20px; 
  }
  
  .product-title { 
    font-size: 20px; 
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .product-scroll-desc {
    max-height: 150px;
  }
  
  .product-description {
    font-size: 14px;
  }
  
  .load-more-btn {
    margin: 20px auto;
    padding: 10px 25px;
    font-size: 14px;
  }

  .product-thumb {
    width: 50px;
    height: 50px;
  }

  .related-section h2 {
    font-size: 20px;
  }

  .related-section {
    margin-top: 40px;
    padding-top: 30px;
  }
}

@media (max-width: 480px) {
  .logo img { 
    height: 38px; 
  }
  
  .header-inner {
    gap: 12px;
  }
  
  .product-grid {
    gap: 10px;
  }
  
  .card-content {
    padding: 10px;
  }
  
  .product-details {
    padding: 15px;
  }
  
  .product-description {
    font-size: 13px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1025px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@keyframes fadeIn { 
  from { opacity: 0; } 
  to { opacity: 1; } 
}