/*
=========================================
CloudCart Global Styles
=========================================
*/

/* =====================================
   Reset
===================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.7;
  overflow-x: hidden;
}

/* =====================================
   Selection
===================================== */

::selection {
  background: var(--color-primary);
  color: var(--color-white);
}

/* =====================================
   Images
===================================== */

img {
  display: block;
  max-width: 100%;
}

/* =====================================
   Links
===================================== */

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-normal);
}

/* =====================================
   Lists
===================================== */

ul,
ol {
  list-style: none;
}

/* =====================================
   Buttons
===================================== */

button {
  border: none;
  outline: none;
  cursor: pointer;
  background: none;
  font: inherit;
}

/* =====================================
   Inputs
===================================== */

input,
select,
textarea {
  border: none;
  outline: none;
  font: inherit;
}

/* =====================================
   Typography
===================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

h1 {
  font-size: var(--fs-4xl);
}

h2 {
  font-size: var(--fs-3xl);
}

h3 {
  font-size: var(--fs-2xl);
}

h4 {
  font-size: var(--fs-xl);
}

p {
  color: var(--color-text-muted);
}

/* =====================================
   Layout
===================================== */

.container {
  width: min(90%, var(--container-width));
  margin: 0 auto;
}

section {
  padding: var(--section-spacing) 0;
}

main {
  min-height: 100vh;
}

/* =====================================
   Utility Classes
===================================== */

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary);
}

.text-gradient {
  background: var(--gradient-primary);

  background-clip: text;
  -webkit-background-clip: text;

  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hidden {
  display: none;
}

/* =====================================
   Buttons
===================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;

  padding: 0.9rem 1.8rem;

  border-radius: var(--radius-round);

  font-weight: var(--fw-semibold);

  transition: var(--transition-normal);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
}

/* =====================================
   Section Heading
===================================== */

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 650px;
  margin: 0 auto;
}

/* =====================================
   Card
===================================== */

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;

  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* =====================================
   Divider
===================================== */

.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: 2rem 0;
}

/*
=========================================
Home Page
=========================================
*/

/* =====================================
Hero Section
===================================== */

.hero {
  padding: 5rem 0 7rem;
}

.hero-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 5rem;
}

.hero-content h1 {
  margin: 1.5rem 0;
  max-width: 650px;
}

.hero-content p {
  max-width: 560px;
  margin-bottom: 2rem;
  font-size: var(--fs-lg);
}

.hero-image img {
  width: 100%;
}

/* =====================================
Hero Badge
===================================== */

.hero-badge {
  display: inline-block;

  padding: 0.55rem 1.2rem;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-round);

  background: rgba(59, 130, 246, 0.12);

  color: var(--color-primary);

  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

/* =====================================
Hero Buttons
===================================== */

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* =====================================
Featured Products
===================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2rem;
}

/* =====================================
Categories
===================================== */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

/* =====================================
Statistics
===================================== */

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

/* =====================================
Reviews
===================================== */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* =====================================
Product Pricing
===================================== */

.product-rating {
  margin-top: 0.5rem;
  color: #ffd43b;
}

.product-rating span {
  color: var(--color-text-muted);
  margin-left: 0.35rem;
}

.product-pricing {
  margin: 1.25rem 0;
}

.current-price {
  font-size: 1.6rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

.usd-price {
  margin-top: 0.35rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.original-price {
  margin-top: 0.4rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.original-price del {
  opacity: 0.8;
}

/* =====================================
Newsletter
===================================== */

.newsletter {
  margin-top: 2rem;
}

/*
=========================================
Products Page
=========================================
*/

.products-hero {
  padding: 5rem 0 2rem;
}

.products-toolbar {
  padding: 1rem 0 3rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.toolbar input,
.toolbar select {
  width: 100%;
  padding: 1rem 1.25rem;

  background: var(--color-card);

  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);

  color: var(--color-text);
}

.toolbar input::placeholder {
  color: var(--color-text-muted);
}

/*
=========================================
Product Details
=========================================
*/

.product-details {
  padding: 5rem 0;
}

.product-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.main-image {
  background: var(--color-card);

  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);

  overflow: hidden;
}

.main-image img {
  width: 100%;
}

.thumbnail-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 1rem;

  margin-top: 1.5rem;
}

.thumbnail-gallery img {
  cursor: pointer;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);

  transition: var(--transition-normal);
}

.thumbnail-gallery img:hover {
  border-color: var(--color-primary);
}

.product-information h1 {
  margin: 0.75rem 0 1rem;
}

.product-description {
  margin: 2rem 0;
}

.product-specifications {
  margin: 2rem 0;
}

.product-specifications h3 {
  margin-bottom: 1rem;
}

.product-specifications ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-specifications li {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease;
}

.product-specifications li:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.product-specifications li:last-child {
  border-bottom: none;
}

.product-specifications li strong {
  color: var(--color-text);
  font-weight: 600;
}

.product-specifications li span {
  color: var(--color-text-muted);
}

.discount-badge {
  margin-left: 0.8rem;

  padding: 0.35rem 0.8rem;

  border-radius: var(--radius-round);

  background: rgba(34, 197, 94, 0.15);

  color: var(--color-success);

  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
}

.product-actions {
  display: flex;
  gap: 1rem;

  margin-top: 2rem;
}

/*
=========================================
Quantity Selector
=========================================
*/

.quantity-selector {
  display: inline-flex;
  align-items: center;

  margin-top: 2rem;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-round);

  overflow: hidden;
}

.quantity-selector button {
  padding: 0.85rem 1.2rem;

  background: var(--color-card);

  color: var(--color-text);

  font-size: 1.1rem;
}

.quantity-input {
  width: 60px;

  text-align: center;

  background: var(--color-background);

  color: var(--color-text);
}

/*
=========================================
Cart
=========================================
*/

.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;

  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 140px 1fr auto auto;
  gap: 2rem;
  align-items: center;

  padding: 1.5rem;
}

.cart-item img {
  width: 100%;

  border-radius: var(--radius-lg);
}

.order-summary {
  height: fit-content;
  padding: 2rem;

  align-self: start;

  position: sticky;
  top: 110px;
}

.summary-row {
  display: flex;
  justify-content: space-between;

  margin: 1rem 0;
}

.summary-row.total {
  font-size: 1.15rem;
}

.order-summary .btn {
  width: 100%;
  margin-top: 2rem;
}

/*
=========================================
Admin Dashboard
=========================================
*/

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.dashboard-icon {
  width: 72px;
  height: 72px;

  margin-bottom: 1.25rem;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(59, 130, 246, 0.08);
  border-radius: var(--radius-lg);
}

.dashboard-icon img {
  width: 34px;
  height: 34px;

  object-fit: contain;
  display: block;
}

.dashboard-title {
  margin-bottom: 0.5rem;
}

.dashboard-value {
  color: var(--color-primary);
  font-size: 2rem;
}

.dashboard-description {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.chart-placeholder {
  margin-top: 2rem;
  padding: 2rem;

  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.chart-bars {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-end;

  height: 320px;

  gap: 2rem;
}

.chart-column {
  flex: 1;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;

  gap: 0.75rem;
}

.chart-column span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.chart-column strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.bar {
  width: 70%;
  min-height: 20px;

  border-radius: 12px 12px 0 0;

  background: var(--gradient-primary);

  transition: all 0.3s ease;
}

.bar:hover {
  transform: translateY(-8px);
  filter: brightness(1.15);
}

.orders-table {
  width: 100%;

  border-collapse: collapse;
}

.orders-table th,
.orders-table td {
  padding: 1rem;

  text-align: left;

  border-bottom: 1px solid var(--color-border);
}

.orders-table th {
  color: var(--color-text);
}

.orders-table td {
  color: var(--color-text-muted);
}

.orders-table td:first-child {
  font-weight: 600;
  color: var(--primary-color);
}

/* =========================================
Order Status Badges
========================================= */

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 120px;

  padding: 0.45rem 0.9rem;

  border-radius: 999px;

  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge.delivered {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status-badge.shipped {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.status-badge.processing {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/*
=========================================
Error Pages
=========================================
*/

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 75vh;

  text-align: center;
}

.error-content h1 {
  font-size: 6rem;

  color: var(--color-primary);

  margin-bottom: 1rem;
}

.error-content h2 {
  margin-bottom: 1rem;
}

.error-content p {
  margin-bottom: 2rem;
}

/*
=========================================
Premium Home Page
=========================================
*/

/* =====================================
Section
===================================== */

section {
  padding: 5rem 0;
}

.section-header {
  max-width: 720px;

  margin: 0 auto 4rem;

  text-align: center;
}

.section-header h1,
.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--color-text-muted);

  font-size: 1.05rem;

  line-height: 1.8;
}

/* =====================================
Hero
===================================== */

.hero {
  position: relative;

  overflow: hidden;

  padding: 7rem 0;
}

.hero::before {
  content: "";

  position: absolute;

  top: -250px;
  right: -250px;

  width: 550px;
  height: 550px;

  border-radius: 50%;

  background: radial-gradient(rgba(79, 70, 229, 0.25), transparent 70%);

  pointer-events: none;
}

.hero::after {
  content: "";

  position: absolute;

  bottom: -180px;
  left: -180px;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  background: radial-gradient(rgba(37, 99, 235, 0.2), transparent 70%);
}

.hero-content {
  position: relative;

  z-index: 2;
}

.hero-content h1 {
  font-size: clamp(3rem, 5vw, 5rem);

  line-height: 1.08;

  margin: 1.5rem 0;
}

.hero-content p {
  max-width: 560px;

  margin-bottom: 2.5rem;
}

.hero-image {
  position: relative;

  display: flex;

  justify-content: center;
}

.hero-image img {
  width: 100%;

  max-width: 620px;

  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.45));
}

/* =====================================
Buttons
===================================== */

.hero-buttons {
  display: flex;

  gap: 1.25rem;

  margin-top: 2rem;
}

.hero-buttons .btn {
  min-width: 180px;
}

/* =====================================
Products
===================================== */

.products-grid {
  margin-top: 1rem;
}

/* =====================================
Statistics
===================================== */

.statistics-grid {
  margin-top: 2rem;
}

/* =====================================
Newsletter
===================================== */

.newsletter {
  padding: 4rem;

  text-align: center;

  border-radius: var(--radius-xl);

  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.16),
    rgba(99, 102, 241, 0.18)
  );

  border: 1px solid rgba(255, 255, 255, 0.08);
}

.newsletter h2 {
  margin: 1rem 0;
}

.newsletter p {
  max-width: 650px;

  margin: auto;

  color: var(--color-text-muted);
}

.newsletter-form {
  display: flex;

  justify-content: center;

  gap: 1rem;

  margin-top: 2rem;
}

.newsletter-form input {
  width: 420px;

  padding: 1rem 1.25rem;

  background: rgba(255, 255, 255, 0.04);

  color: var(--color-text);

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: var(--radius-round);
}

.newsletter-form input:focus {
  outline: none;

  border-color: var(--color-primary);
}

/* =====================================
Divider
===================================== */

.divider {
  width: 100%;

  height: 1px;

  margin: 1.5rem 0;

  background: rgba(255, 255, 255, 0.08);
}

/* =====================================
Smooth Hover
===================================== */

img {
  transition: 0.4s ease;
}

button,
.btn {
  transition: 0.3s ease;
}

/*
=========================================
Final Premium Polish
=========================================
*/

/* =====================================
Navbar
===================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(12, 18, 32, 0.75);
  backdrop-filter: blur(18px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;

  min-height: 78px;
}

/* Logo */

.logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;

  font-size: 1.8rem;
  font-weight: 800;

  color: var(--color-text);
}

.logo img {
  display: block;
  width: auto;
  height: 150px;
  max-width: 240px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.logo span {
  color: var(--color-text);
}

.menu-toggle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* =====================================
Navigation
===================================== */

.nav-links {
  display: flex;

  gap: 2rem;

  align-items: center;
}

.nav-links a {
  position: relative;

  color: var(--color-text-muted);

  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -8px;

  width: 0;
  height: 2px;

  background: var(--gradient-primary);

  transition: 0.35s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* =====================================
Buttons
===================================== */

.btn {
  display: inline-flex;

  justify-content: center;

  align-items: center;

  padding: 1rem 1.8rem;

  border-radius: var(--radius-round);

  font-weight: 600;
}

.btn-primary {
  background: var(--gradient-primary);

  color: white;
}

.btn-secondary {
  background: transparent;

  color: var(--color-text);

  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
}

/* =====================================
Product Details
===================================== */

.product-information {
  display: flex;

  flex-direction: column;

  justify-content: center;
}

.product-specifications ul {
  padding-left: 1.2rem;
}

.product-specifications li {
  margin-bottom: 0.85rem;
}

/* =====================================
Cart
===================================== */

.cart-item {
  border-radius: var(--radius-xl);
}

.cart-item-details h3 {
  margin-bottom: 0.5rem;
}

.order-summary {
  position: sticky;

  top: 110px;
}

/* =====================================
Dashboard
===================================== */

.orders-table {
  margin-top: 2rem;
}

.orders-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* =====================================
Chart
===================================== */

.bar {
  cursor: pointer;
}

.bar:nth-child(1) {
  animation-delay: 0.05s;
}

.bar:nth-child(2) {
  animation-delay: 0.1s;
}

.bar:nth-child(3) {
  animation-delay: 0.15s;
}

.bar:nth-child(4) {
  animation-delay: 0.2s;
}

.bar:nth-child(5) {
  animation-delay: 0.25s;
}

.bar:nth-child(6) {
  animation-delay: 0.3s;
}

.bar:nth-child(7) {
  animation-delay: 0.35s;
}

/* =====================================
Footer
===================================== */

.footer {
  margin-top: 5rem;

  padding: 5rem 0 2rem;

  background: rgba(255, 255, 255, 0.02);

  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;

  grid-template-columns: 2fr 1fr 1fr 1fr;

  gap: 3rem;
}

.footer-brand {
  display: flex;

  flex-direction: column;
}

.footer-logo {
  display: flex;

  align-items: center;

  gap: 0.75rem;

  margin-bottom: 1.5rem;
}

.footer-logo img {
  width: auto;

  height: 70px;

  object-fit: contain;
}

.footer-logo span {
  font-size: 1.6rem;

  font-weight: 700;

  color: var(--color-text);
}

.footer h4 {
  margin-bottom: 1.25rem;
}

.footer p {
  color: var(--color-text-muted);

  line-height: 1.8;
}

.footer-links ul {
  display: flex;

  flex-direction: column;

  gap: 0.9rem;
}

.footer-links a {
  color: var(--color-text-muted);

  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--color-primary);

  padding-left: 6px;
}

.footer-bottom {
  margin-top: 4rem;

  padding-top: 2rem;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  display: flex;

  justify-content: space-between;

  align-items: center;

  flex-wrap: wrap;

  gap: 1rem;
}

.footer-bottom p {
  color: var(--color-text-muted);

  font-size: 0.9rem;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;

    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-brand {
    text-align: center;
  }
}

.footer-brand p {
  max-width: 520px;
}

/* =====================================
Scrollbar
===================================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0b1020;
}

::-webkit-scrollbar-thumb {
  border-radius: 100px;

  background: linear-gradient(#3b82f6, #6366f1);
}

/* =====================================
Selection
===================================== */

::selection {
  background: rgba(59, 130, 246, 0.35);

  color: white;
}

/* =====================================
Focus
===================================== */

input:focus,
select:focus,
button:focus {
  outline: 2px solid rgba(59, 130, 246, 0.4);

  outline-offset: 2px;
}

/* =====================================
Cart Page Layout
===================================== */

.cart-header {
  padding: 4rem 0 2rem;
}

.cart-section {
  padding: 2rem 0 5rem;
}
