.woocommerce-cart {
  font-family: var(--font-primary);
}

body.woocommerce-cart,
body.woocommerce-cart .site,
body.woocommerce-cart .site-content,
body.woocommerce-cart main,
body.woocommerce-cart article,
body.woocommerce-cart .entry-content,
body.woocommerce-cart .content-area,
body.woocommerce-cart .inside-article,
.woocommerce,
.woocommerce-page {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
}

body.woocommerce-cart .woocommerce-notices-wrapper {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--space-md) !important;
  padding-right: var(--space-md) !important;
  box-sizing: border-box !important;
  margin-top: var(--space-md) !important;
  margin-bottom: var(--space-lg) !important;
}

.lg-cart-wrapper {
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  width: 100vw !important;
}

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: var(--space-md) 50px var(--space-md) 50px !important;
  margin: 0 !important;
  border-radius: var(--radius-soft) !important;
  font-family: var(--font-primary) !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  font-size: var(--fs-body) !important;
  line-height: 1.5 !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.woocommerce-message {
  background: rgba(46, 125, 50, 0.08) !important;
  color: #2e7d32 !important;
}

.woocommerce-message::before {
  content: "✓" !important;
  position: absolute !important;
  left: 12px !important;
  top: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #2e7d32 !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 14px !important;
}

.woocommerce-message a.button {
  display: inline-block !important;
  margin: var(--space-md) 0 0 !important;
  padding: 10px 24px !important;
  background: var(--color-accent-main) !important;
  color: white !important;
  text-decoration: none !important;
  border-radius: var(--radius-soft) !important;
  font-weight: var(--fw-medium) !important;
  font-size: var(--fs-small) !important;
  transition: var(--transition-fast) !important;
  text-align: center !important;
}

.woocommerce-message .button {
  align-self: center !important;
}

.woocommerce-message a.button:hover {
  background: #8a7c69 !important;
}

.lg-cart-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.lg-cart-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  margin: 0;
}

.lg-cart-items {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  margin: 0 !important;
}

.lg-cart-item {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 16px 45px 16px;
  margin: 0 var(--space-md) var(--space-md);
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  align-items: flex-start;
  position: relative;
  height: auto !important;
}

.lg-item-image {
  width: 100px;
  height: 130px;
  border-radius: 6px;
  overflow: hidden;
  background: #f9f9f9;
  flex-shrink: 0;
}

.lg-item-image a {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.lg-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.lg-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: initial;
  height: auto;
}

.lg-item-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.lg-item-name {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
  color: #333;
  flex: 1;
}

.lg-item-name a {
  color: inherit;
  text-decoration: none;
}

.lg-item-name a:hover {
  color: var(--color-accent-main);
}

.lg-item-price {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  line-height: 1.3;
}

.lg-item-row-2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
}

.lg-item-actions-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  flex-wrap: wrap;
}

.lg-item-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lg-item-quantity-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.lg-item-quantity input {
  width: 45px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  background: white;
}

.lg-item-quantity input:focus {
  outline: none;
  border-color: var(--color-accent-main);
}

.lg-item-variant {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.lg-item-variant-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

.lg-item-variant select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: white;
  cursor: pointer;
}

.lg-item-variant select:focus {
  outline: none;
  border-color: var(--color-accent-main);
}

.lg-item-variant-text {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.lg-remove-item {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 12px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  white-space: nowrap;
  margin: 0 !important;
  z-index: 10;
}

.lg-remove-item:hover {
  color: #c62828;
}

.lg-view-cut-preview {
  color: var(--color-accent-main, #a1907d);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
  white-space: nowrap;
}

.lg-view-cut-preview:hover {
  color: #8a7a6a;
  text-decoration: underline;
}

.lg-view-cut-preview svg {
  flex-shrink: 0;
}

.lg-item-meta {
  display: none;
}

.lg-cart-checkout {
  padding: var(--space-lg) var(--space-md);
  background: var(--color-ivory);
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  margin-top: var(--space-2xl) !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

.lg-checkout-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.3px;
  padding: 0;
}

.lg-checkout-totals {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: 0;
}

.lg-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-body);
}

.lg-total-row.main {
  font-size: var(--fs-large);
  font-weight: var(--fw-medium);
  padding-top: var(--space-md);
  border-top: 2px solid var(--color-line);
}

.lg-total-row.main .lg-total-value {
  font-weight: 700 !important;
}

.lg-total-label {
  color: var(--color-text-secondary);
}

.lg-total-value {
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
}

.lg-btn-checkout {
  width: 100%;
  margin: 0;
  padding: 14px 24px;
  background: var(--color-accent-main);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-soft);
  font-weight: var(--fw-medium);
  font-size: 15px;
  letter-spacing: 0.3px;
  display: block;
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
}

.lg-btn-checkout:hover {
  background: #8a7c69;
  color: white;
  transform: translateY(-1px);
}

.lg-continue-shopping {
  text-align: center;
  margin-top: var(--space-md);
  padding: 0;
}

.lg-continue-shopping a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  font-size: var(--fs-small);
}

.lg-continue-shopping a:hover {
  color: var(--color-accent-main);
}

.lg-cart-upsells {
  padding: var(--space-2xl) var(--space-lg);
  background: white;
}

.lg-upsells-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.lg-empty-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

.lg-empty-cta .lg-btn-primary {
  display: inline-block;
  width: auto;
}

.lg-upsells-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.lg-upsell-card {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-soft);
  overflow: hidden;
  transition: var(--transition-base);
}

.lg-upsell-card:hover {
  border-color: var(--color-accent-main);
  box-shadow: var(--shadow-soft);
}

.lg-upsell-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-ivory);
}

.lg-upsell-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lg-upsell-details {
  padding: var(--space-md);
}

.lg-upsell-name {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.lg-upsell-price {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--color-accent-main);
}

.lg-cart-empty {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  max-width: 600px;
  margin: 0 auto;
}

.lg-empty-icon {
  margin-bottom: var(--space-xl);
  opacity: 0.4;
}

.lg-empty-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-md);
}

.lg-empty-text {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.lg-btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-accent-main);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-soft);
  font-weight: var(--fw-medium);
  letter-spacing: 0.3px;
  transition: var(--transition-base);
}

.lg-btn-primary:hover {
  background: #8a7c69;
  color: white;
}

.lg-cart-item.updating {
  opacity: 0.5;
  pointer-events: none;
}

.lg-cart-item.updating::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 3px solid var(--color-line);
  border-top-color: var(--color-accent-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (min-width: 769px) {
  body.woocommerce-cart .site-content,
  body.woocommerce-cart main {
    padding-left: initial !important;
    padding-right: initial !important;
  }
  
  body.woocommerce-cart .woocommerce-notices-wrapper {
    padding-left: var(--space-xl) !important;
    padding-right: var(--space-xl) !important;
  }
  
  .lg-cart-wrapper {
    width: auto !important;
    max-width: 100% !important;
  }
  
  .lg-cart-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-2xl);
    padding: var(--space-xl);
    max-width: 1200px;
  }
  
  .lg-cart-content {
    order: 1;
  }
  
  .lg-cart-title {
    padding: 0 0 var(--space-md) 0;
  }
  
  .lg-cart-items {
    padding: 0;
  }
  
  .lg-cart-item {
    padding: 20px 20px 50px 20px;
    margin: 0 0 16px 0;
    gap: 20px;
  }
  
  .lg-item-image {
    width: 120px;
    height: 150px;
  }
  
  .lg-item-content {
    min-height: initial;
    height: auto;
  }
  
  .lg-item-name {
    font-size: 16px;
  }
  
  .lg-item-price {
    font-size: 18px;
  }
  
  .lg-item-row-2 {
    gap: 10px;
  }
  
  .lg-item-quantity input {
    width: 50px;
    height: 34px;
  }
  
  .lg-item-variant select {
    padding: 7px 12px;
    font-size: 14px;
  }
  
  .lg-remove-item {
    font-size: 13px;
    bottom: 16px;
  }
  
  .lg-cart-checkout {
    order: 2;
    position: sticky;
    top: 100px;
    height: fit-content;
    border-radius: var(--radius-soft);
    padding: var(--space-xl);
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
  }
  
  .lg-checkout-title {
    padding: 0;
  }
  
  .lg-checkout-totals {
    padding: 0;
  }
  
  .lg-btn-checkout {
    width: 100%;
    margin: 0;
  }
  
  .lg-continue-shopping {
    padding: 0;
  }
  
  .lg-cart-upsells {
    grid-column: 1 / -1;
  }
  
  .lg-upsells-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }
  
  .lg-item-quantity-label,
  .lg-item-variant-label {
    font-size: var(--fs-small);
  }
  
  .lg-item-quantity input {
    width: 50px;
    height: 32px;
    font-size: var(--fs-small);
  }
  
  .lg-item-variant select {
    min-width: 180px;
    max-width: 220px;
    font-size: var(--fs-small);
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  body.woocommerce-cart .woocommerce-notices-wrapper {
    padding-left: var(--space-sm) !important;
    padding-right: var(--space-sm) !important;
  }
  
  .lg-upsells-grid {
    grid-template-columns: 1fr;
  }
  
  .lg-cart-title {
    padding: var(--space-md) var(--space-sm) var(--space-sm);
    font-size: var(--fs-h3);
  }
  
  .lg-cart-items {
    padding: 0 !important;
  }
  
  .lg-cart-item {
    padding: 14px 14px 42px 14px;
    margin: 0 12px 12px;
    gap: 12px;
  }
  
  .lg-item-image {
    width: 85px;
    height: 110px;
  }
  
  .lg-item-content {
    min-height: initial;
    height: auto;
  }
  
  .lg-item-name {
    font-size: 13px;
  }
  
  .lg-item-price {
    font-size: 14px;
  }
  
  .lg-item-row-2 {
    gap: 8px;
  }
  
  .lg-item-quantity input {
    width: 40px;
    height: 28px;
    font-size: 13px;
  }
  
  .lg-item-variant {
    flex: 1 1 100%;
  }
  
  .lg-item-variant select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  
  .lg-item-actions-row {
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 4px;
  }
  
  .lg-view-cut-preview {
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
  }
  
  .lg-view-cut-preview svg {
    width: 12px;
    height: 12px;
  }
  
  .lg-remove-item {
    font-size: 11px;
    bottom: 10px;
    right: 12px;
  }
  
  .lg-cart-checkout {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .lg-checkout-title {
    padding: 0;
  }
  
  .lg-checkout-totals {
    padding: 0;
  }
  
  .lg-btn-checkout {
    width: 100%;
    margin: 0;
  }
  
  .lg-continue-shopping {
    padding: 0;
  }
}

#lg-cut-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#lg-cut-preview-modal.lg-modal-open {
  display: flex !important;
}

#lg-cut-preview-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 900px;
}

.lg-cut-modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lg-cut-modal-content h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
  color: #333;
  font-family: var(--font-primary, sans-serif);
  width: 100%;
}

#lg-cut-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  line-height: 1;
  z-index: 10;
}

#lg-cut-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

#lg-cut-modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  display: block;
}

.lg-modal-dim-top {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: #000;
  padding: clamp(6px, 1.5vw, 8px) clamp(12px, 2vw, 16px);
  font-size: clamp(12px, 2vw, 15px);
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--font-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 5;
}

.lg-modal-dim-top::before {
  content: '↔';
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: bold;
}

.lg-modal-dim-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  background: white;
  color: #000;
  padding-inline: clamp(12px, 2vw, 16px);
  padding-block: clamp(6px, 1.5vw, 8px);
  font-size: clamp(12px, 2vw, 15px);
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--font-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 5;
}

.lg-modal-dim-left::before {
  content: '↔';
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: bold;
}

.lg-modal-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.lg-btn-modify {
  display: inline-block;
  padding: 10px 20px;
  background: #a1907d;
  color: white !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-primary);
  transition: all 0.2s;
  white-space: nowrap;
}

.lg-btn-modify:hover {
  background: #8a7c69 !important;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .lg-cut-modal-content {
    padding: 20px;
    max-height: 80vh;
    max-width: calc(100vw - 40px);
  }
  
  .lg-cut-modal-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  #lg-cut-modal-close {
    top: 10px;
    right: 10px;
    font-size: 28px;
    width: 35px;
    height: 35px;
  }
  
  #lg-cut-preview-wrapper {
    max-width: 100%;
  }
  
  .lg-btn-modify {
    width: 100%;
    text-align: center;
  }
}

.lg-trust-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  margin-top: 24px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

.lg-trust-security {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #2e7d32;
}

.lg-trust-security svg {
  color: #2e7d32;
  flex-shrink: 0;
}

.lg-payment-logos {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.lg-payment-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  height: 34px;
  min-width: 60px;
}

.lg-payment-logo img {
  max-height: 22px;
  max-width: 45px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .lg-trust-banner {
    padding: 16px;
    gap: 12px;
  }
  
  .lg-trust-security {
    font-size: 13px;
  }
  
  .lg-payment-logos {
    gap: 6px;
  }
  
  .lg-payment-logo {
    padding: 5px 8px;
    height: 32px;
  }
  
  .lg-payment-logo img {
    max-height: 20px;
    max-width: 45px;
  }
}