/* =========================
   CART PAGE SHELL
   ========================= */

html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  overflow-x: hidden;
  background: #050505;
}

body.rosalia-cart-page-template {
  margin: 0 !important;
  padding: 0 !important;
  background: #050505 !important;
}

/* Masque le chrome du thème sur la page panier */
#main-container,
.site-main,
.entry-header,
.hero-section,
.page-title,
.ct-page-title,
.ct-footer,
footer.site-footer,
#footer,
.site-header,
#header,
header#header,
.woocommerce-breadcrumb,
.content-area,
.site-content,
main#main,
article.page > header,
.ct-container,
.ct-content-area,
.entry-content > h1,
.entry-content > .wp-block-post-title {
  display: none !important;
}

/* Root de la page panier */
.rosalia-cart-page-root {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Retire les marges parasites autour du shortcode */
.rosalia-cart-page-root .woocommerce,
.rosalia-cart-page-root .entry-content,
.rosalia-cart-page-root .post-content,
.rosalia-cart-page-root .ct-content-area {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

/* Admin bar */
body.admin-bar .rosalia-cart-page-root {
  min-height: calc(100vh - 32px);
}

@media (max-width: 782px) {
  body.admin-bar .rosalia-cart-page-root {
    min-height: calc(100vh - 46px);
  }
}

/* =========================
   ROSALIA CART / EMPTY CART
   ========================= */

.rs-cart-page-wrap,
.rs-cart-page-wrap *,
.rs-cart-empty-page-wrap,
.rs-cart-empty-page-wrap * {
  box-sizing: border-box !important;
}

/* Masque les éléments WooCommerce natifs qu'on remplace */
.woocommerce .cart-empty,
.woocommerce .return-to-shop,
.woocommerce-notices-wrapper,
.woocommerce form.woocommerce-cart-form,
.woocommerce .cart-collaterals {
  display: none !important;
}

.entry-content > .woocommerce {
  margin: 0 !important;
  max-width: none !important;
}

/* Shell global */
.rs-cart-page-wrap,
.rs-cart-empty-page-wrap {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #fff;
  padding: 0;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.rs-cart-bg-overlay,
.rs-cart-empty-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.rs-cart-shell,
.rs-cart-empty-shell {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Topbar commune */
.rs-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 28px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  margin: 0;
}

.rs-top-logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -2px;
  color: #fff;
  text-decoration: none;
}

.rs-top-logo:hover {
  color: #fff;
  opacity: 0.95;
}

.rs-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rs-top-link:hover {
  background: #fff;
  color: #000;
}

/* ===== CART FILLED ===== */

.rs-cart-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 30px 15px 40px;
}

.rs-cart-header {
  text-align: center;
  margin-bottom: 30px;
}

.rs-cart-title {
  color: #ffffff;
  font-size: 38px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0 0 15px 0;
  letter-spacing: -1px;
}

.rs-cart-title--empty {
  font-size: 28px;
}

.rs-warning-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.rs-glass-card {
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  color: white;
}

.rs-cart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.rs-cart-item {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 25px;
  margin-bottom: 25px;
}

.rs-cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.rs-item-img-wrap {
  flex: 0 0 120px;
}

.rs-item-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  display: block;
}

.rs-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.rs-item-title {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 5px 0;
  color: white;
  text-decoration: none;
  word-wrap: break-word;
}

.rs-item-title:hover {
  color: #fff;
  opacity: 0.9;
}

.rs-item-variant {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  font-family: monospace;
}

.rs-item-props {
  font-size: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  margin-bottom: 8px;
}

.rs-item-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: auto;
}

.rs-item-price-qty {
  font-family: monospace;
  font-size: 16px;
  font-weight: bold;
  color: white;
}

.rs-item-remove {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-decoration: underline;
  transition: 0.2s;
  white-space: nowrap;
}

.rs-item-remove:hover {
  color: #ff0000;
}

.rs-summary-title {
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff !important;
}

.rs-summary-row {
  display: flex;
  justify-content: space-between;
  font-family: monospace;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  gap: 20px;
}

.rs-summary-total {
  display: flex;
  justify-content: space-between;
  font-family: monospace;
  font-size: 22px;
  font-weight: bold;
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 5px;
  margin-bottom: 25px;
  gap: 20px;
}

.rs-checkout-btn {
  background: white;
  color: black;
  border: none;
  border-radius: 6px;
  padding: 20px;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  transition: 0.3s;
  display: block;
  text-align: center;
  text-decoration: none;
}

.rs-checkout-btn:hover {
  background: #e5e5e5;
  transform: translateY(-2px);
  color: #000;
}

.rs-payment-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  margin-bottom: 10px;
}

.rs-payment-logos img {
  height: 22px;
  width: auto;
}

.rs-secure-txt {
  text-align: center;
  font-family: monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

/* ===== EMPTY CART ===== */

.rs-cart-empty-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.rs-cart-empty-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.rs-empty-card {
  width: 100%;
  max-width: 760px;
  text-align: center;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 42px 26px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  color: white;
}

.rs-empty-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.rs-empty-title {
  color: #ffffff;
  font-size: 38px;
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
  margin: 0 0 14px 0;
}

.rs-empty-text {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto 28px;
  font-size: 15px;
  line-height: 1.7;
  max-width: 520px;
}

.rs-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  background: #fff;
  color: #000;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  transition: 0.3s ease;
}

.rs-empty-btn:hover {
  background: #e5e5e5;
  color: #000;
  transform: translateY(-2px);
}

/* ===== DESKTOP ===== */

@media (min-width: 900px) {
  .rs-cart-container {
    padding: 50px 20px 60px;
  }

  .rs-cart-grid {
    grid-template-columns: 2fr 1fr;
  }

  .rs-glass-card {
    padding: 40px;
  }

  .rs-summary-sticky {
    height: fit-content;
    position: sticky;
    top: 40px;
  }

  .rs-cart-empty-container {
    padding: 60px 20px 80px;
  }

  .rs-empty-card {
    padding: 56px 40px;
  }
}

/* ===== MOBILE ===== */

@media (max-width: 767px) {
  .rs-topbar {
    padding: 14px 16px 10px;
  }

  .rs-top-logo {
    font-size: 20px;
    letter-spacing: -1px;
  }

  .rs-top-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }

  .rs-cart-title {
    font-size: 28px;
  }

  .rs-empty-title {
    font-size: 28px;
  }

  .rs-warning-banner {
    padding: 10px 14px;
    font-size: 11px;
    line-height: 1.5;
  }

  .rs-glass-card {
    padding: 20px;
  }

  .rs-cart-item {
    flex-direction: column;
  }

  .rs-item-img-wrap {
    flex: none;
  }

  .rs-item-img {
    width: 100%;
    height: auto;
    max-width: 160px;
  }

  .rs-item-price-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rs-empty-card {
    padding: 30px 20px;
  }

  .rs-empty-text {
    font-size: 14px;
  }
}