/*!
Theme Name: MR Device Care
Theme URI: https://mrdevicecare.com
Description: বাংলাদেশী ই-কমার্স থিম - বিশ্বস্ত পুরাতন মোবাইল ও অরিজিনাল পার্টসের ঠিকানা। WooCommerce সাপোর্ট সহ সম্পূর্ণ প্রফেশনাল ডিজাইন।
Version: 1.0.0
Author: MR Device Care
Author URI: https://mrdevicecare.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mr-device-care
Domain Path: /languages
Requires at least: 5.8
Requires PHP: 7.4
WC Requires at least: 5.0
WC Tested up to: 8.5
*/

:root {
  --primary: #0d1b2a;
  --secondary: #1b2838;
  --accent: #e8002d;
  --accent2: #ff6b35;
  --gold: #ffc107;
  --green: #00c851;
  --wa: #25d366;
  --white: #fff;
  --light: #f4f5f7;
  --gray: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 8px 30px rgba(232, 0, 45, 0.15);
  --r: 10px;
  --r-sm: 6px;
  --tr: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--light);
  color: var(--primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--tr);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: var(--tr);
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

input, textarea, select {
  font-family: inherit;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ========== CONTAINER ========== */
.wrap, .container-fluid {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== TOPBAR ========== */
.topbar {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar span, .topbar a {
  display: flex;
  align-items: center;
  gap: 5px;
}

.topbar a {
  color: rgba(255, 255, 255, 0.7);
}

.topbar a:hover {
  color: var(--gold);
}

.topbar i {
  color: var(--gold);
}

/* ========== SITE HEADER ========== */
.site-header {
  background: white;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: var(--tr);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-box {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent), #8b0000);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(232, 0, 45, 0.35);
}

.site-logo .name {
  font-family: 'Exo 2', sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
}

.site-logo .name span {
  color: var(--accent);
}

.site-logo .tag {
  font-size: 10px;
  color: var(--gray);
  line-height: 1.3;
}

.search-bar {
  flex: 1;
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.search-bar form {
  display: flex;
  gap: 4px;
}

.search-bar input {
  flex: 1;
  padding: 11px 18px;
  border: 2px solid var(--border);
  border-radius: 30px;
  font-size: 13px;
  background: var(--light);
  transition: var(--tr);
}

.search-bar input:focus {
  border-color: var(--accent);
  background: white;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 0, 45, 0.1);
}

.search-bar input::placeholder {
  color: #aaa;
}

.search-btn {
  background: var(--accent);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--tr);
  flex-shrink: 0;
}

.search-btn:hover {
  background: var(--primary);
  transform: scale(1.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  background: none;
  color: var(--primary);
  font-size: 11px;
  position: relative;
}

.header-btn i {
  font-size: 21px;
  transition: var(--tr);
}

.header-btn:hover {
  background: var(--light);
}

.header-btn:hover i {
  color: var(--accent);
}

.header-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.wa-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--wa);
  color: white;
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.wa-btn i {
  font-size: 18px;
}

.wa-btn:hover {
  background: #1aab52;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ========== NAVIGATION ========== */
.main-nav {
  background: var(--primary);
}

.nav-inner {
  display: flex;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 16px;
}

.all-cat-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: white;
  padding: 0 20px;
  height: 46px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.all-cat-btn:hover {
  background: #b8001f;
}

.nav-menu {
  display: flex;
  align-items: center;
  overflow-x: auto;
  gap: 0;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.8);
  padding: 0 15px;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.current-menu-item {
  color: white;
  border-bottom-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.nav-menu a i {
  color: var(--gold);
  font-size: 13px;
}

.nav-tag {
  background: var(--gold);
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 4px;
}

/* ========== SECTION HEADER ========== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.sec-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 17px;
}

.sec-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
}

.sec-subtitle {
  font-size: 12px;
  color: var(--gray);
  margin-top: 2px;
}

.sec-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  max-width: 180px;
  margin: 0 12px;
}

.view-all {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}

.view-all:hover {
  background: var(--accent);
}

/* ========== PRODUCTS ========== */
section {
  padding: 20px 0;
}

.white-sec {
  background: white;
}

.light-sec {
  background: var(--light);
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.prod-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.prod-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.prod-card {
  background: white;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--tr);
  position: relative;
}

.prod-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.prod-img {
  position: relative;
  height: 190px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  overflow: hidden;
}

.prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prod-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
  text-transform: uppercase;
}

.prod-badge.used {
  background: var(--accent2);
}

.prod-badge.new {
  background: var(--green);
}

.prod-wish {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  color: #ccc;
  font-size: 15px;
  z-index: 1;
  border: none;
}

.prod-wish:hover {
  color: var(--accent);
  transform: scale(1.1);
}

.prod-info {
  padding: 13px;
}

.prod-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prod-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
  font-size: 11px;
  margin-bottom: 7px;
}

.prod-price-box {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.prod-price {
  font-family: 'Exo 2', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
}

.prod-old-price {
  font-size: 12px;
  color: #bbb;
  text-decoration: line-through;
}

.add-btn {
  background: var(--accent);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.add-btn:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* ========== PARTS CATEGORIES ========== */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.part-card {
  background: white;
  border-radius: var(--r);
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--tr);
}

.part-card:hover {
  box-shadow: 0 6px 22px rgba(232, 0, 45, 0.15);
  transform: translateY(-3px);
}

.part-card:hover .part-icon {
  background: var(--accent);
  color: white;
}

.part-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #fff5f6, #ffe0e4);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 10px;
  transition: var(--tr);
}

.part-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3px;
}

.part-card p {
  font-size: 11px;
  color: var(--gray);
}

/* ========== FEATURES BAR ========== */
.features-bar {
  background: var(--primary);
  padding: 18px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.feature {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.feature:last-child {
  border-right: none;
}

.feat-icon {
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 20px;
  flex-shrink: 0;
}

.feat-text h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.feat-text p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

/* ========== REVIEWS ========== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.review-card {
  background: white;
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: var(--tr);
}

.review-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.rev-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.rev-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.rev-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.rev-info p {
  font-size: 11px;
  color: var(--gray);
}

.stars {
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 10px;
}

.rev-text {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
}

/* ========== FOOTER ========== */
footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 30px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.f-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.f-col ul li {
  margin-bottom: 6px;
}

.f-col ul a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.f-col ul a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.footer-bot {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
}

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

/* ========== FLOATING BUTTONS ========== */
.floating-wa {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--wa);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 99;
  animation: float-anim 3s ease-in-out infinite;
  border: none;
}

.floating-wa:hover {
  transform: scale(1.12);
}

@keyframes float-anim {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ========== WooCommerce STYLES ========== */
.woocommerce-message,
.woocommerce-info {
  background: var(--light);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--r-sm);
}

.woocommerce-form-login,
.woocommerce-form-register {
  background: white;
  padding: 20px;
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.woocommerce-form-register input,
.woocommerce-form-login input {
  border: 2px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px;
  margin-bottom: 12px;
  width: 100%;
}

.woocommerce-form-register input:focus,
.woocommerce-form-login input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 0, 45, 0.1);
}

.woocommerce form .form-row button {
  background: var(--accent);
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
}

.woocommerce form .form-row button:hover {
  background: var(--primary);
}

.woocommerce .quantity input {
  border: 2px solid var(--border);
  width: 50px;
  text-align: center;
  padding: 5px;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input[type="button"],
.woocommerce input[type="submit"] {
  background: var(--accent);
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  border: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--primary);
}

.woocommerce .star-rating {
  color: var(--gold);
}

.woocommerce ul.products li.product {
  transition: var(--tr);
}

.woocommerce ul.products li.product:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .prod-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .prod-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .parts-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .search-bar {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
  }
  .prod-grid,
  .prod-grid-4,
  .prod-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .parts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .feature {
    padding: 0 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .feature:last-child {
    border-bottom: none;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .prod-grid,
  .prod-grid-4,
  .prod-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .parts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .sec-title {
    font-size: 16px;
  }
}