/**
 * CHIMPMODE Download - WooCommerce Styles
 *
 * Authentic 2001-2004 Download Manager Aesthetic
 * Classic Windows XP / Early 2000s Software UI
 *
 * @package ChimpmodeDownload
 */

/* ══════════════════════════════════════
   SELECT2 SCROLL FIX
   Prevents Select2 dropdowns from locking page scroll
   ══════════════════════════════════════ */

body.woocommerce-checkout,
body.chimpmode-checkout,
html {
    overflow: visible !important;
    overflow-y: auto !important;
    height: auto !important;
}

/* Prevent Select2 from adding overflow:hidden to body */
body.select2-dropdown-open {
    overflow: visible !important;
    overflow-y: auto !important;
}

/* Ensure Select2 dropdowns don't block scroll */
.select2-container--open ~ * {
    pointer-events: auto;
}

/* Position Select2 dropdowns properly */
.select2-container--open .select2-dropdown {
    position: absolute;
    z-index: 100000;
}

/* ══════════════════════════════════════
   EXPRESS CHECKOUT SECTION (Apple Pay, Google Pay)
   ══════════════════════════════════════ */

/* Express checkout section wrapper */
.express-checkout-section {
    margin: 12px;
}

/* Hide express checkout section if buttons container is empty */
.express-checkout-section:has(.express-buttons-container:empty) {
    display: none;
}

.express-checkout-section #express-checkout-section {
    background: linear-gradient(180deg, #f8f8f8 0%, #fff 100%);
    border: 1px solid #7f9db9;
}

.express-checkout-section #express-checkout-section legend {
    font-size: 13px;
    font-weight: bold;
    color: #003399;
    padding: 0 6px;
    margin-left: 6px;
}

.express-checkout-content {
    padding: 10px;
}

.express-checkout-description {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 0 0 12px 0;
}

/* Container for express payment buttons */
.express-buttons-container {
    min-height: 50px;
}

/* Hide if no express buttons available */
.express-buttons-container:empty {
    display: none;
}

/* Express buttons container when populated by Stripe */
.express-buttons-container .wc-stripe-payment-request-button-wrapper,
.express-buttons-container .woopay-express-button,
.express-buttons-container #wc-stripe-express-checkout-button,
.express-buttons-container .stripe-payment-request-button {
    margin: 0 auto;
    max-width: 300px;
}

/* Separator between express and regular checkout */
.express-checkout-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0 8px 0;
    font-size: 12px;
    color: #666;
}

.express-checkout-separator::before,
.express-checkout-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #c0c0c0;
}

.express-checkout-separator span {
    padding: 0 12px;
    background: #ece9d8;
}

/* Legacy styling for inline Stripe buttons (fallback) */
.woocommerce-checkout .wc-stripe-payment-request-wrapper,
.woocommerce-checkout .woopay-express-button,
.woocommerce-checkout .wc-stripe-express-checkout-button {
    margin: 12px;
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #7f9db9;
}

.woocommerce-checkout .wc-stripe-payment-request-wrapper p,
.woocommerce-checkout .wc-stripe-express-checkout-button p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Style the express checkout separator (legacy) */
.wc-stripe-payment-request-button-separator,
.woopay-express-button__separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 15px 12px;
    font-size: 12px;
    color: #666;
}

.wc-stripe-payment-request-button-separator::before,
.wc-stripe-payment-request-button-separator::after,
.woopay-express-button__separator::before,
.woopay-express-button__separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #c0c0c0;
}

.wc-stripe-payment-request-button-separator::before,
.woopay-express-button__separator::before {
    margin-right: 10px;
}

.wc-stripe-payment-request-button-separator::after,
.woopay-express-button__separator::after {
    margin-left: 10px;
}

/* ══════════════════════════════════════
   WOOCOMMERCE NOTICES
   ══════════════════════════════════════ */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 10px 14px;
    margin: 8px;
    font-size: 13px;
    border: 1px solid;
    position: relative;
    animation: noticeSlideIn 0.3s ease-out;
}

.woocommerce-message {
    background: #e8ffe8;
    border-color: #88cc88;
    color: #006600;
}

.woocommerce-error {
    background: #ffe8e8;
    border-color: #cc8888;
    color: #880000;
    list-style: none;
    padding-left: 14px;
}

.woocommerce-error li {
    margin: 4px 0;
}

.woocommerce-info {
    background: #e8f4ff;
    border-color: #88aacc;
    color: #004488;
}

.woocommerce-message a,
.woocommerce-error a,
.woocommerce-info a {
    font-weight: bold;
    text-decoration: underline;
}

/* Auto-dismiss fade out */
.woocommerce-message.fade-out,
.woocommerce-error.fade-out,
.woocommerce-info.fade-out {
    animation: noticeFadeOut 0.5s ease-out forwards;
}

@keyframes noticeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes noticeFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        height: 0;
        padding: 0;
        margin: 0;
        border: 0;
    }
}

/* ══════════════════════════════════════
   SINGLE PRODUCT PAGE - CLASSIC APP LAYOUT
   ══════════════════════════════════════ */

.product-page {
    padding: 0;
    background: #ece9d8;
}

/* Two-Panel Layout */
.product-panels {
    display: grid;
    grid-template-columns: 280px 1fr;
    border: 1px solid #7f9db9;
    background: #fff;
}

/* Pane Headers (like classic app toolbars) */
.pane-header {
    padding: 4px 8px;
    background: linear-gradient(180deg, #ece9d8 0%, #d8d4c4 100%);
    border-bottom: 1px solid #9c9a8c;
    box-shadow: inset 0 1px 0 #fff;
}

.pane-title {
    font-size: 13px;
    font-weight: bold;
    color: #003399;
}

.pane-content {
    padding: 10px;
    background: #fff;
}

/* ══════════════════════════════════════
   PREVIEW PANE (Left Panel)
   ══════════════════════════════════════ */

.preview-pane {
    border-right: 1px solid #7f9db9;
    display: flex;
    flex-direction: column;
}

.preview-pane .pane-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Image Viewer */
.image-viewer {
    border: 1px solid #7f9db9;
    padding: 4px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Slime green background for product visibility */
    background-color: #ADFF2F;
}

.image-viewer a {
    display: block;
    line-height: 0;
    cursor: pointer;
}

.image-viewer img {
    max-width: 100%;
    max-height: 240px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.no-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 24px;
    color: #808080;
    text-align: center;
}

.no-preview-icon {
    font-size: 56px;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}

.no-preview-text {
    font-size: 12px;
    text-transform: uppercase;
}

/* Thumbnail Strip */
.thumbnail-strip {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: #f0f0f0;
    border: 1px solid #808080;
    border-top-color: #404040;
    border-left-color: #404040;
}

.thumb-btn {
    width: 50px;
    height: 50px;
    padding: 2px;
    border: 1px solid #808080;
    cursor: pointer;
    overflow: hidden;
    /* Slime green background for product visibility */
    background-color: #ADFF2F;
}

.thumb-btn:hover {
    border-color: #0054e3;
}

.thumb-btn.active {
    border: 2px solid #0054e3;
    padding: 1px;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* File Stats */
.file-stats {
    background: #f5f5f5;
    border: 1px solid #808080;
    border-top-color: #404040;
    border-left-color: #404040;
    padding: 8px;
    font-size: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dotted #c0c0c0;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #000;
}

.stat-seeds {
    color: #008800;
}

.stat-peers {
    color: #0066cc;
}

/* ══════════════════════════════════════
   DETAILS PANE (Right Panel)
   ══════════════════════════════════════ */

.details-pane {
    display: flex;
    flex-direction: column;
}

.details-pane .pane-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Classic Windows Fieldset/Group Box */
.field-group {
    border: 1px solid #7f9db9;
    padding: 10px;
    margin: 0;
    background: #fff;
}

.field-group legend {
    font-size: 13px;
    font-weight: bold;
    color: #003399;
    padding: 0 6px;
    margin-left: 6px;
}

.field-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
    font-size: 13px;
}

.field-row label {
    min-width: 70px;
    color: #666;
    font-weight: normal;
}

.field-value {
    color: #000;
    flex: 1;
}

.field-name {
    font-weight: bold;
    color: #000;
}

.field-price {
    font-weight: bold;
    color: #006600;
    font-size: 14px;
}

.field-price del {
    color: #999;
    font-weight: normal;
}

.field-price ins {
    text-decoration: none;
}

.status-available {
    color: #008800;
    font-weight: bold;
}

.status-unavailable {
    color: #cc0000;
    font-weight: bold;
}

/* ══════════════════════════════════════
   CLASSIC TABS (Embossed Software Tabs)
   ══════════════════════════════════════ */

.info-tabs {
    border: 1px solid #7f9db9;
    background: #fff;
}

.tab-strip {
    display: flex;
    background: #ece9d8;
    padding: 3px 3px 0 3px;
    gap: 2px;
    border-bottom: 1px solid #7f9db9;
}

.tab-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: normal;
    background: linear-gradient(180deg, #fff 0%, #ece9d8 50%, #d8d4c4 100%);
    border: 1px solid #808080;
    border-bottom: none;
    border-radius: 2px 2px 0 0;
    cursor: pointer;
    position: relative;
    top: 1px;
    margin-bottom: -1px;
    color: #000;
}

.tab-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #f5f3ea 100%);
}

.tab-btn:focus {
    outline: 1px dotted #000;
    outline-offset: -2px;
}

.tab-btn.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    font-weight: bold;
    z-index: 1;
}

.tab-panels {
    padding: 12px;
    min-height: 70px;
    font-size: 13px;
    line-height: 1.5;
    color: #000;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.no-content {
    color: #808080;
    font-style: italic;
}

.description-content {
    line-height: 1.7;
    font-size: 13px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.description-content p {
    margin: 0 0 10px 0;
}

.description-content p:last-child {
    margin-bottom: 0;
}

/* Handle HTML lists */
.description-content ul,
.description-content ol {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.description-content li {
    margin-bottom: 4px;
}

/* Scrollbar styling for description */
.description-content::-webkit-scrollbar {
    width: 12px;
}

.description-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border: 1px solid #c0c0c0;
}

.description-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fff 0%, #ece9d8 50%, #d8d4c4 100%);
    border: 1px solid #808080;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-item {
    padding: 8px;
    background: #f8f8f8;
    border: 1px solid #ddd;
}

.review-header {
    margin-bottom: 6px;
    font-size: 12px;
}

.review-rating {
    color: #ff9900;
    margin-left: 8px;
}

.review-text {
    font-size: 12px;
    color: #444;
}

/* Tech Info */
.tech-info {
    font-size: 12px;
}

.tech-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dotted #c0c0c0;
}

.tech-row:last-child {
    border-bottom: none;
}

.tech-row span:first-child {
    color: #666;
}

.tech-row span:last-child {
    color: #000;
    font-weight: bold;
}

/* ══════════════════════════════════════
   OPTIONS GROUP
   ══════════════════════════════════════ */

.options-group table.variations {
    width: 100%;
    border-collapse: collapse;
}

.options-group .field-row-table {
    border-bottom: 1px dotted #c0c0c0;
}

.options-group .field-row-table:last-child {
    border-bottom: none;
}

.options-group .label-cell {
    width: 80px;
    padding: 8px 10px 8px 0;
    font-size: 13px;
    color: #666;
    vertical-align: middle;
    text-align: left;
}

.options-group .value-cell {
    padding: 8px 0;
    vertical-align: middle;
}

/* Inline "Sizing guide" link next to Size dropdown */
.options-group .variation-select-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.options-group .variation-select-row select.variation-select {
    flex: 0 1 auto;
}

.options-group .size-guide-link {
    font-size: 12px;
    color: #0054e3;
    text-decoration: underline;
    white-space: nowrap;
}

.options-group .size-guide-link:hover {
    color: #003399;
}

.options-group select,
.options-group .variation-select {
    padding: 5px 8px;
    border: 1px solid #7f9db9;
    background: #fff;
    font-size: 13px;
    min-width: 160px;
}

.options-group select:focus,
.options-group .variation-select:focus {
    border-color: #0054e3;
    outline: none;
}

.options-group input[type="number"] {
    padding: 5px 8px;
    border: 1px solid #7f9db9;
    background: #fff;
    font-size: 13px;
    width: 70px;
    text-align: center;
}

.options-group input[type="number"]:focus {
    border-color: #0054e3;
    outline: none;
}

/* WooCommerce quantity input override */
.quantity {
    display: inline-flex;
    align-items: center;
}

.quantity .qty {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid #7f9db9;
    text-align: center;
    font-size: 13px;
}

/* Variation price display */
.single_variation_wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dotted #c0c0c0;
}

.single_variation_wrap:empty,
.single_variation_wrap .woocommerce-variation:empty {
    display: none;
}

.single_variation .woocommerce-variation-price {
    font-size: 14px;
    font-weight: bold;
    color: #006600;
}

.single_variation .woocommerce-variation-price del {
    color: #999;
    font-weight: normal;
    font-size: 12px;
}

.single_variation .woocommerce-variation-availability {
    font-size: 12px;
    margin-top: 6px;
}

.single_variation .woocommerce-variation-availability .stock {
    color: #006600;
}

.single_variation .woocommerce-variation-availability .out-of-stock {
    color: #cc0000;
}

/* Hide the reset link - keep it clean */
.reset_variations {
    display: none;
}

/* ══════════════════════════════════════
   ACTIONS GROUP
   ══════════════════════════════════════ */

.actions-group {
    margin-top: auto;
}

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cart-form {
    display: inline-block;
}

.btn-add-cart,
.btn-buy {
    padding: 6px 20px;
    font-size: 13px;
    min-height: 30px;
}

.btn-add-cart {
    min-width: 120px;
}

.btn-buy {
    min-width: 100px;
}

/* ══════════════════════════════════════
   RELATED DOWNLOADS SECTION
   ══════════════════════════════════════ */

.related-section {
    margin-top: 12px;
    border: 1px solid #7f9db9;
    background: #fff;
}

.section-header {
    padding: 6px 10px;
    background: linear-gradient(180deg, #ece9d8 0%, #d8d4c4 100%);
    border-bottom: 1px solid #9c9a8c;
    font-size: 13px;
    font-weight: bold;
    color: #003399;
    box-shadow: inset 0 1px 0 #fff;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 1px;
    padding: 1px;
    background: #7f9db9;
}

.related-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #fff;
    text-decoration: none;
    color: #000;
}

.related-item:hover {
    background: #e8f0f8;
}

.related-thumb {
    flex-shrink: 0;
    margin-bottom: 6px;
    border: 1px solid #808080;
    line-height: 0;
    height: 140px;
    overflow: hidden;
    /* Slime green background for product visibility */
    background: #ADFF2F;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.related-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.related-name {
    font-size: 12px;
    font-weight: bold;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-price {
    font-size: 12px;
    color: #006600;
    font-weight: bold;
    margin-top: auto;
}

/* ══════════════════════════════════════
   LIGHTBOX (Classic Windows Dialog)
   ══════════════════════════════════════ */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-container {
    background: #ece9d8;
    border: 2px solid #0054e3;
    box-shadow:
        0 0 0 1px #002d96 inset,
        1px 1px 0 #fff inset,
        4px 4px 16px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px 4px 10px;
    background: linear-gradient(180deg,
        #0a246a 0%,
        #0f3b8c 8%,
        #1456b8 15%,
        #1a6bce 25%,
        #1e7ae0 50%,
        #1a6bce 75%,
        #1456b8 85%,
        #0f3b8c 92%,
        #0a246a 100%);
}

.lightbox-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    width: 26px;
    height: 26px;
    background: linear-gradient(180deg, #d86868 0%, #c83838 50%, #b02828 100%);
    border: 1px solid #801818;
    border-radius: 3px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: linear-gradient(180deg, #e87878 0%, #d84848 50%, #c03030 100%);
}

.lightbox-content {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 350px;
    min-height: 250px;
    overflow: hidden;
    position: relative;
    /* Slime green background for product visibility */
    background-color: #ADFF2F;
}

.lightbox-content img {
    max-width: 80vw;
    max-height: 70vh;
    display: block;
    cursor: zoom-in;
    transition: transform 0.15s ease-out;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    touch-action: none;
}

/* Zoomed state */
.lightbox-content.zoomed img {
    max-width: none;
    max-height: none;
    cursor: grab;
    transition: none;
}

.lightbox-content.zoomed img:active {
    cursor: grabbing;
}

/* Mobile hint for initial state (how to zoom) - only on touch devices */
@media (hover: none) and (pointer: coarse) {
    .lightbox-content:not(.zoomed)::after {
        content: 'Tap to zoom';
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        font-size: 12px;
        padding: 6px 14px;
        border-radius: 3px;
        pointer-events: none;
        opacity: 0;
        animation: hintFadeInOut 4s ease-out forwards;
    }
}

/* Mobile hint for zoomed state */
.lightbox-content.zoomed::after {
    content: 'Drag to pan • Tap to zoom out';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 3px;
    pointer-events: none;
    opacity: 0;
    animation: hintFadeInOut 3s ease-out forwards;
}

@keyframes hintFadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

.lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #ece9d8;
    border-top: 1px solid #fff;
}

.lightbox-prev,
.lightbox-next {
    padding: 5px 16px;
    background: linear-gradient(180deg, #fff 0%, #ece9d8 50%, #d8d4c4 100%);
    border: 1px solid #808080;
    font-size: 13px;
    cursor: pointer;
    box-shadow:
        inset 1px 1px 0 #fff,
        inset -1px -1px 0 #808080;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: linear-gradient(180deg, #fff 0%, #f5f3ea 100%);
    border-color: #0054e3;
}

.lightbox-prev:active,
.lightbox-next:active {
    background: linear-gradient(180deg, #d8d4c4 0%, #ccc8b8 100%);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.lightbox-counter {
    font-size: 13px;
    color: #666;
}

/* ══════════════════════════════════════════════════════════════════════════
   CART PAGE - ACTIVE TRANSFERS VIEW
   Custom PHP template styling (woocommerce/cart.php)
   ══════════════════════════════════════════════════════════════════════════ */

/* Remove forced min-height on cart/checkout pages */
.chimpmode-cart .software-window,
.chimpmode-checkout .software-window {
    min-height: auto;
}

.active-transfers-view {
    padding: 0;
    background: #ece9d8;
    flex: none; /* Don't stretch to fill window */
}

/* Two-Panel Layout */
.transfers-panels {
    display: grid;
    grid-template-columns: 1fr 320px;
    border: 1px solid #7f9db9;
    background: #fff;
    align-items: start; /* Don't stretch panels vertically */
}

/* LEFT: Transfers List Pane */
.transfers-list-pane {
    border-right: 1px solid #7f9db9;
    display: flex;
    flex-direction: column;
}

.transfers-list-pane .pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pane-count {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

/* Transfer Items List */
.transfers-list {
    display: flex;
    flex-direction: column;
}

.transfer-item {
    display: grid;
    grid-template-columns: 68px 1fr 140px;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    align-items: start;
}

.transfer-item:hover {
    background: #f5f9fc;
}

.transfer-item:last-child {
    border-bottom: none;
}

/* Transfer Thumbnail */
.transfer-thumb {
    width: 64px;
    height: 64px;
    border: 1px solid #7f9db9;
    overflow: hidden;
    /* Slime green background for product visibility */
    background-color: #ADFF2F;
}

.transfer-thumb a {
    display: block;
    line-height: 0;
}

.transfer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Transfer Info */
.transfer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.transfer-name {
    font-size: 13px;
    font-weight: bold;
    color: #000;
}

.transfer-name a {
    color: #000;
    text-decoration: none;
}

.transfer-name a:hover {
    color: #0054e3;
}

.transfer-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: #666;
}

.meta-size,
.meta-speed {
    color: #666;
}

.meta-price {
    color: #006600;
    font-weight: bold;
}

/* Transfer Progress Bar */
.transfer-progress {
    height: 12px;
    background: #fff;
    border: 1px solid #7f9db9;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
}

.transfer-progress-bar {
    height: 100%;
    background: linear-gradient(180deg,
        #7fd6fd 0%,
        #3cb4f0 50%,
        #0099e6 100%);
}

.transfer-status {
    font-size: 10px;
    color: #0066cc;
    margin-top: 2px;
}

/* Transfer Controls */
.transfer-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.transfer-quantity {
    display: flex;
    align-items: center;
}

.transfer-quantity .quantity {
    display: flex;
    align-items: center;
}

.transfer-quantity .qty {
    width: 50px;
    padding: 4px 6px;
    text-align: center;
    border: 1px solid #7f9db9;
    font-size: 12px;
}

.transfer-subtotal {
    font-size: 13px;
    font-weight: bold;
    color: #006600;
}

.transfer-remove {
    padding: 4px 10px;
    font-size: 11px;
}

/* Hidden update cart button */
.update-cart-btn {
    display: none;
}

/* RIGHT: Summary Pane */
.transfers-summary-pane {
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
}

.transfers-summary-pane .pane-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Summary Rows */
.summary-rows {
    display: flex;
    flex-direction: column;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dotted #c0c0c0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: #666;
}

.summary-value {
    font-weight: bold;
    color: #000;
}

.summary-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #7f9db9;
    border-bottom: none;
}

.summary-total .summary-label {
    font-weight: bold;
    color: #003399;
}

.summary-total .summary-value {
    font-size: 16px;
    color: #006600;
}

/* Shipping methods in cart/checkout summary */
.summary-value .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
}

.summary-value .woocommerce-shipping-methods li {
    margin: 0;
    padding: 2px 0;
}

.summary-value .woocommerce-shipping-methods label {
    font-weight: bold;
    color: #000;
}

.summary-value .woocommerce-shipping-methods input[type="radio"] {
    margin-right: 6px;
}

/* Shipping calculator link */
.summary-value .shipping-calculator-button {
    display: block;
    font-size: 11px;
    color: #0054e3;
    margin-top: 4px;
}

/* Simple shipping total display */
.summary-row .shipping-total {
    font-weight: bold;
    color: #000;
}

/* When shipping is being calculated */
.summary-value .woocommerce-shipping-destination {
    font-size: 11px;
    color: #666;
    font-weight: normal;
}

/* Shipping row specific styles */
.shipping-row .free-shipping {
    color: #006600 !important;
    font-weight: bold !important;
}

.shipping-row .calc-shipping,
.summary-row .calc-shipping {
    color: #666 !important;
    font-style: italic !important;
    font-weight: normal !important;
    font-size: 12px !important;
}

/* Shipping unavailable error state */
.shipping-row .no-shipping-available,
.summary-row .no-shipping-available {
    color: #cc0000 !important;
    font-weight: bold !important;
    font-size: 12px !important;
}

.shipping-row.shipping-error {
    background: #fff0f0;
    padding: 8px;
    margin: -2px -8px;
    border: 1px solid #ffcccc;
}

/* Disabled checkout button when shipping unavailable */
.checkout-disabled,
.complete-btn.checkout-disabled,
button.checkout-disabled {
    background: linear-gradient(180deg, #ccc 0%, #aaa 50%, #999 100%) !important;
    border-color: #888 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    text-shadow: none !important;
    opacity: 0.7;
}

.checkout-disabled:hover {
    background: linear-gradient(180deg, #ccc 0%, #aaa 50%, #999 100%) !important;
}

/* Same as shipping checkbox */
.same-as-shipping-wrapper {
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px dotted #c0c0c0;
}

.same-as-shipping-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.same-as-shipping-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.same-as-shipping-label span {
    color: #333;
}

/* Hide billing fields wrapper when same as shipping */
.billing-fields-wrapper {
    transition: all 0.2s ease;
}

/* Coupon Input */
.coupon-group .coupon-input-row {
    display: flex;
    gap: 6px;
}

.coupon-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #7f9db9;
    font-size: 12px;
}

.coupon-input:focus {
    border-color: #0054e3;
    outline: none;
}

.apply-coupon-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Action Buttons - Cart/Checkout specific (stacked) */
.transfers-summary-pane .action-buttons,
.checkout-summary-pane .action-buttons,
.complete-status-pane .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.finalize-btn,
.continue-btn,
.complete-btn,
.back-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
}

.finalize-btn,
.complete-btn {
    font-weight: bold;
}

/* ══════════════════════════════════════
   EMPTY CART STATE
   ══════════════════════════════════════ */

.empty-transfers {
    border: 1px solid #7f9db9;
    background: #fff;
}

.empty-message {
    text-align: center;
    padding: 60px 30px;
}

.empty-icon {
    font-size: 48px;
    color: #808080;
    font-family: 'Courier New', monospace;
    margin-bottom: 16px;
}

.empty-message h2 {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin: 0 0 8px 0;
}

.empty-message p {
    font-size: 13px;
    color: #666;
    margin: 0 0 20px 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   CHECKOUT PAGE - FINALIZE TRANSFERS VIEW
   Custom PHP template styling (woocommerce/checkout.php)
   ══════════════════════════════════════════════════════════════════════════ */

.finalize-transfers-view {
    padding: 0;
    background: #ece9d8;
    flex: none; /* Don't stretch to fill window */
}

/* Two-Panel Layout */
.checkout-panels {
    display: grid;
    grid-template-columns: 1fr 320px;
    border: 1px solid #7f9db9;
    background: #fff;
    align-items: start;
}

/* LEFT: Checkout Form Pane */
.checkout-form-pane {
    border-right: 1px solid #7f9db9;
    display: flex;
    flex-direction: column;
}

.checkout-form-pane .pane-header {
    border-bottom: 1px solid #e0e0e0;
}

/* Checkout Sections */
.checkout-section {
    margin: 12px;
}

.checkout-section:first-of-type {
    margin-top: 16px;
}

/* Form Fields */
.checkout-section .form-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* WooCommerce Form Row Overrides */
.checkout-section .form-row {
    margin: 0;
    padding: 0;
}

.checkout-section .form-row label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.checkout-section .form-row label .required {
    color: #cc0000;
}

.checkout-section .form-row input.input-text,
.checkout-section .form-row textarea,
.checkout-section .form-row select {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #7f9db9;
    background: #fff;
    box-sizing: border-box;
}

.checkout-section .form-row input.input-text:focus,
.checkout-section .form-row textarea:focus,
.checkout-section .form-row select:focus {
    border-color: #0054e3;
    outline: none;
}

/* Two-column layout for form fields */
.checkout-section .form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkout-section .form-row-wide,
.checkout-section .form-row-first:only-child {
    grid-column: 1 / -1;
}

/* Payment Methods */
#payment-section .payment-methods {
    margin-top: 4px;
}

.payment_methods {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wc_payment_method {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 6px;
    background: #f8f8f8;
}

.wc_payment_method:hover {
    background: #f0f0f0;
}

.wc_payment_method input[type="radio"] {
    margin-right: 8px;
}

.wc_payment_method label {
    font-size: 13px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
}

.wc_payment_method .payment_box {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-size: 12px;
    color: #666;
}

.no-payment-needed {
    font-size: 13px;
    color: #006600;
    padding: 10px;
    background: #e8ffe8;
    border: 1px solid #008800;
}

/* Account creation */
.create-account-notice {
    font-size: 12px;
    color: #666;
    margin: 0 0 10px 0;
}

.create-account label.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

/* RIGHT: Checkout Summary Pane */
.checkout-summary-pane {
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
}

.checkout-summary-pane .pane-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Order Items in Summary */
.order-items {
    display: flex;
    flex-direction: column;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px dotted #c0c0c0;
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    color: #000;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-qty {
    color: #666;
    font-size: 11px;
}

.item-total {
    font-weight: bold;
    color: #006600;
    margin-left: 10px;
}

/* Terms checkbox */
.terms-group .terms {
    margin: 0;
}

.terms-group .terms label.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1.4;
}

.terms-group .terms label.checkbox input {
    margin-top: 2px;
}

.terms-group .terms label.checkbox a {
    color: #0054e3;
}

/* ══════════════════════════════════════════════════════════════════════════
   ORDER RECEIVED - TRANSFER COMPLETE VIEW
   Custom PHP template styling (woocommerce/order-received.php)
   ══════════════════════════════════════════════════════════════════════════ */

.transfer-complete-view {
    padding: 0;
    background: #ece9d8;
    flex: none; /* Don't stretch to fill window */
}

/* Two-Panel Layout */
.transfer-complete-panels {
    display: grid;
    grid-template-columns: 1fr 320px;
    border: 1px solid #7f9db9;
    background: #fff;
    align-items: start;
}

/* LEFT: Complete Status Pane */
.complete-status-pane {
    border-right: 1px solid #7f9db9;
    display: flex;
    flex-direction: column;
}

.complete-status-pane .pane-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(180deg, #e8ffe8 0%, #d0f0d0 100%);
    border: 1px solid #88cc88;
}

.success-icon {
    font-size: 48px;
    color: #008800;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
}

.success-message h2 {
    font-size: 16px;
    font-weight: bold;
    color: #006600;
    margin: 0 0 8px 0;
}

.success-message p {
    font-size: 13px;
    color: #444;
    margin: 0;
}

.order-number {
    font-size: 14px;
    font-weight: bold;
    color: #003399;
    margin-top: 12px !important;
}

/* Detail Rows */
.detail-rows {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dotted #c0c0c0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: bold;
    color: #000;
}

/* Order Status Colors */
.status-pending {
    color: #cc6600;
}

.status-processing {
    color: #0066cc;
}

.status-on-hold {
    color: #cc6600;
}

.status-completed {
    color: #008800;
}

.status-cancelled,
.status-refunded,
.status-failed {
    color: #cc0000;
}

/* RIGHT: Complete Summary Pane */
.complete-summary-pane {
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
}

.complete-summary-pane .pane-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Completed Order Items */
.order-item.completed {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: start;
    padding: 8px 0;
}

.item-status {
    font-family: 'Courier New', monospace;
    color: #008800;
    font-size: 12px;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-item .item-name {
    font-size: 12px;
    font-weight: bold;
    color: #000;
    white-space: normal;
}

.item-meta {
    font-size: 11px;
    color: #666;
}

/* Download Links */
.downloads-group .download-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.download-link-item .btn {
    display: block;
    width: 100%;
    text-align: center;
}


/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 900px) {
    /* Cart - Two-panel to stacked */
    .transfers-panels,
    .checkout-panels,
    .transfer-complete-panels {
        grid-template-columns: 1fr;
    }

    .transfers-list-pane,
    .checkout-form-pane,
    .complete-status-pane {
        border-right: none;
    }

    /* Cart: Products first, then summary */
    .transfers-list-pane {
        order: 1;
        border-bottom: 1px solid #7f9db9;
    }

    .transfers-summary-pane {
        order: 2;
    }

    /* Checkout: Form first, then summary with actions at bottom */
    .checkout-form-pane {
        order: 1;
        border-bottom: 1px solid #7f9db9;
    }

    .checkout-summary-pane {
        order: 2;
    }

    /* Order complete: Status first, then summary */
    .complete-status-pane {
        order: 1;
        border-bottom: 1px solid #7f9db9;
    }

    .complete-summary-pane {
        order: 2;
    }
}

@media (max-width: 720px) {
    .product-panels {
        grid-template-columns: 1fr;
    }

    .preview-pane {
        border-right: none;
        border-bottom: 1px solid #7f9db9;
    }

    .image-viewer img {
        max-height: 180px;
    }

    .thumbnail-strip {
        justify-content: center;
    }

    .related-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-buy {
        width: 100%;
    }

    /* Cart items - compact layout */
    .transfer-item {
        grid-template-columns: 52px 1fr;
    }

    .transfer-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dotted #c0c0c0;
    }

    .transfer-thumb {
        width: 48px;
        height: 48px;
    }

    /* Checkout form - single column */
    .checkout-section .form-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tab-strip {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 60px;
        text-align: center;
        padding: 4px 6px;
        font-size: 10px;
    }

    .field-row {
        flex-direction: column;
        gap: 2px;
    }

    .field-row label {
        min-width: auto;
    }

    .related-list {
        grid-template-columns: 1fr;
    }

    .lightbox-content img {
        max-width: 95vw;
        max-height: 60vh;
    }

    /* Cart - even more compact */
    .transfer-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .transfer-progress {
        display: none;
    }

    .transfer-status {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   WOOCOMMERCE BLOCKS - CART & CHECKOUT
   Classic Fieldset Style matching Single Product Page
   ══════════════════════════════════════════════════════════════════════════ */

/* Base reset for WooCommerce blocks */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
    font-family: Tahoma, Verdana, 'Trebuchet MS', Geneva, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #000;
    max-width: 100%;
}

/* Remove all default borders and backgrounds from WooCommerce */
.wc-block-components-sidebar-layout,
.wc-block-cart,
.wc-block-checkout,
.wc-block-components-main,
.wc-block-components-sidebar {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ══════════════════════════════════════
   LAYOUT - Two Column Flex
   ══════════════════════════════════════ */

.wc-block-components-sidebar-layout,
.wc-block-cart,
.wc-block-checkout {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px !important;
    align-items: flex-start !important;
    padding: 12px !important;
}

/* Main content - takes remaining space */
.wc-block-components-main,
.wc-block-cart__main,
.wc-block-checkout__main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    order: 1 !important;
}

/* Sidebar - fixed width */
.wc-block-components-sidebar,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
    flex: 0 0 300px !important;
    width: 300px !important;
    order: 2 !important;
}

/* ══════════════════════════════════════
   CART PAGE - Download Queue Style
   ══════════════════════════════════════ */

/* Cart items container - like a file list */
.wc-block-cart__main {
    background: #fff !important;
    border: 1px solid #7f9db9 !important;
}

/* Cart header row */
.wc-block-cart-items__header {
    display: none !important;
}

/* Individual cart items */
.wc-block-cart-items__row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    background: #fff !important;
}

.wc-block-cart-items__row:hover {
    background: #f5f9fc !important;
}

.wc-block-cart-items__row:last-child {
    border-bottom: none !important;
}

/* Product image */
.wc-block-cart-item__image {
    flex: 0 0 64px !important;
    width: 64px !important;
}

.wc-block-cart-item__image img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border: 1px solid #7f9db9 !important;
    display: block !important;
}

/* Product info */
.wc-block-cart-item__product {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.wc-block-components-product-name {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #000 !important;
    text-decoration: none !important;
}

.wc-block-components-product-name:hover {
    color: #0054e3 !important;
}

/* Product price */
.wc-block-cart-item__product .wc-block-components-product-price {
    font-size: 13px !important;
    color: #006600 !important;
    font-weight: bold !important;
}

/* Product metadata (variations) */
.wc-block-components-product-metadata {
    font-size: 12px !important;
    color: #666 !important;
}

/* Quantity selector */
.wc-block-cart-item__quantity {
    flex: 0 0 auto !important;
}

.wc-block-components-quantity-selector {
    display: inline-flex !important;
    align-items: stretch !important;
    border: 1px solid #7f9db9 !important;
    background: #fff !important;
}

.wc-block-components-quantity-selector__button {
    width: 28px !important;
    height: 28px !important;
    background: linear-gradient(180deg, #fff 0%, #ece9d8 100%) !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wc-block-components-quantity-selector__button:hover {
    background: linear-gradient(180deg, #fff 0%, #f5f3ea 100%) !important;
}

.wc-block-components-quantity-selector__input {
    width: 40px !important;
    height: 28px !important;
    border: none !important;
    border-left: 1px solid #7f9db9 !important;
    border-right: 1px solid #7f9db9 !important;
    text-align: center !important;
    font-size: 13px !important;
    background: #fff !important;
}

/* Remove link */
.wc-block-cart-item__remove-link {
    font-size: 12px !important;
    color: #cc0000 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 4px !important;
}

.wc-block-cart-item__remove-link:hover {
    color: #ff0000 !important;
}

/* Item total */
.wc-block-cart-item__total {
    flex: 0 0 auto !important;
    text-align: right !important;
}

.wc-block-cart-item__total .wc-block-components-product-price {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #006600 !important;
}

/* ══════════════════════════════════════
   CART SIDEBAR - Totals Panel
   ══════════════════════════════════════ */

.wc-block-cart__sidebar {
    background: transparent !important;
    border: none !important;
}

/* Cart totals fieldset style */
.wc-block-cart__sidebar > div {
    border: 1px solid #7f9db9 !important;
    background: #fff !important;
    position: relative !important;
    margin-top: 8px !important;
    padding: 12px !important;
}

/* Totals title as legend */
.wc-block-cart__totals-title {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #003399 !important;
    background: #fff !important;
    padding: 0 6px !important;
    position: absolute !important;
    top: -9px !important;
    left: 10px !important;
    line-height: 1 !important;
}

/* Totals rows */
.wc-block-components-totals-item {
    display: flex !important;
    justify-content: space-between !important;
    padding: 6px 0 !important;
    border-bottom: 1px dotted #c0c0c0 !important;
    font-size: 13px !important;
}

.wc-block-components-totals-item:last-child {
    border-bottom: none !important;
}

.wc-block-components-totals-item__label {
    color: #666 !important;
}

.wc-block-components-totals-item__value {
    font-weight: bold !important;
    color: #000 !important;
}

/* Footer total */
.wc-block-components-totals-footer-item {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #7f9db9 !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    font-weight: bold !important;
    color: #003399 !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 16px !important;
    color: #006600 !important;
}

/* Coupon link */
.wc-block-components-totals-coupon__button,
.wc-block-components-panel__button {
    background: none !important;
    border: none !important;
    color: #0054e3 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    font-size: 12px !important;
    padding: 6px 0 !important;
}

/* Proceed to checkout button */
.wc-block-cart__submit-button,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-cart__submit-button {
    display: block !important;
    width: 100% !important;
    padding: 10px 20px !important;
    margin-top: 12px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-align: center !important;
    background: linear-gradient(180deg, #8fe08f 0%, #66cc66 15%, #44aa44 50%, #339933 85%, #228822 100%) !important;
    border: 1px solid #006600 !important;
    color: #fff !important;
    text-shadow: 0 -1px 0 rgba(0, 50, 0, 0.5) !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.wc-block-cart__submit-button:hover {
    background: linear-gradient(180deg, #9fe89f 0%, #77dd77 15%, #55bb55 50%, #44aa44 85%, #339933 100%) !important;
}

/* ══════════════════════════════════════
   CHECKOUT PAGE - Fieldset Style
   ══════════════════════════════════════ */

.wc-block-checkout__main {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

/* Each checkout section as a fieldset */
.wc-block-components-checkout-step {
    border: 1px solid #7f9db9 !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
}

/* Section heading as legend */
.wc-block-components-checkout-step__heading {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #003399 !important;
    background: #fff !important;
    padding: 0 6px !important;
    position: absolute !important;
    top: -9px !important;
    left: 10px !important;
    line-height: 1 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Hide the step number */
.wc-block-components-checkout-step__heading::before {
    display: none !important;
}

/* Step content area */
.wc-block-components-checkout-step__container {
    padding: 16px 12px 12px 12px !important;
}

.wc-block-components-checkout-step__content {
    width: 100% !important;
}

/* Form fields */
.wc-block-components-text-input,
.wc-block-components-country-input,
.wc-block-components-state-input,
.wc-block-components-combobox {
    margin-bottom: 10px !important;
}

/* Labels */
.wc-block-components-text-input label,
.wc-block-components-country-input label,
.wc-block-components-combobox label {
    font-size: 12px !important;
    color: #666 !important;
    margin-bottom: 4px !important;
    display: block !important;
    position: static !important;
    transform: none !important;
}

/* Input fields */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-combobox input,
.wc-block-components-country-input select,
.wc-block-components-state-input select {
    width: 100% !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
    border: 1px solid #7f9db9 !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.wc-block-components-text-input input:focus,
.wc-block-components-combobox input:focus {
    border-color: #0054e3 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Address form grid */
.wc-block-components-address-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.wc-block-components-address-form > .wc-block-components-text-input:first-child,
.wc-block-components-address-form > .wc-block-components-country-input,
.wc-block-components-address-form__address_1,
.wc-block-components-address-form__address_2 {
    grid-column: 1 / -1 !important;
}

/* Radio buttons for shipping methods */
.wc-block-components-radio-control__option {
    padding: 8px 10px !important;
    border: 1px solid #e0e0e0 !important;
    margin-bottom: 6px !important;
    background: #f8f8f8 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.wc-block-components-radio-control__option:hover {
    background: #f0f0f0 !important;
}

.wc-block-components-radio-control__option-checked {
    background: #e8f0f8 !important;
    border-color: #7f9db9 !important;
}

.wc-block-components-radio-control__label {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #000 !important;
}

.wc-block-components-radio-control__description {
    font-size: 12px !important;
    color: #666 !important;
}

/* Payment methods */
.wc-block-components-payment-method-label {
    font-size: 13px !important;
    font-weight: bold !important;
}

/* ══════════════════════════════════════
   CHECKOUT SIDEBAR - Order Summary
   ══════════════════════════════════════ */

.wc-block-checkout__sidebar {
    border: 1px solid #7f9db9 !important;
    background: #fff !important;
    position: relative !important;
    padding: 12px !important;
}

/* Order summary title */
.wc-block-components-order-summary .wc-block-components-panel__button,
.wc-block-checkout__sidebar h2 {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #003399 !important;
    background: #fff !important;
    padding: 0 6px !important;
    position: absolute !important;
    top: -9px !important;
    left: 10px !important;
    border: none !important;
    text-decoration: none !important;
    cursor: default !important;
}

/* Order items */
.wc-block-components-order-summary-item {
    display: flex !important;
    gap: 10px !important;
    padding: 8px 0 !important;
    border-bottom: 1px dotted #c0c0c0 !important;
}

.wc-block-components-order-summary-item:last-child {
    border-bottom: none !important;
}

.wc-block-components-order-summary-item__image {
    flex: 0 0 48px !important;
    position: relative !important;
}

.wc-block-components-order-summary-item__image img {
    width: 44px !important;
    height: 44px !important;
    object-fit: cover !important;
    border: 1px solid #7f9db9 !important;
}

.wc-block-components-order-summary-item__quantity {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: #003399 !important;
    color: #fff !important;
    font-size: 10px !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wc-block-components-order-summary-item__description {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.wc-block-components-order-summary-item__name {
    font-size: 12px !important;
    font-weight: bold !important;
    color: #000 !important;
}

.wc-block-components-order-summary-item__individual-price {
    font-size: 11px !important;
    color: #666 !important;
}

.wc-block-components-order-summary-item__total-price {
    font-size: 13px !important;
    font-weight: bold !important;
    color: #006600 !important;
}

/* Checkout totals in sidebar */
.wc-block-checkout__sidebar .wc-block-components-totals-wrapper {
    border-top: 1px solid #e0e0e0 !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
}

/* Place order button */
.wc-block-components-checkout-place-order-button {
    display: block !important;
    width: 100% !important;
    padding: 12px 20px !important;
    margin-top: 12px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-align: center !important;
    background: linear-gradient(180deg, #8fe08f 0%, #66cc66 15%, #44aa44 50%, #339933 85%, #228822 100%) !important;
    border: 1px solid #006600 !important;
    color: #fff !important;
    text-shadow: 0 -1px 0 rgba(0, 50, 0, 0.5) !important;
    cursor: pointer !important;
}

.wc-block-components-checkout-place-order-button:hover {
    background: linear-gradient(180deg, #9fe89f 0%, #77dd77 15%, #55bb55 50%, #44aa44 85%, #339933 100%) !important;
}

/* ══════════════════════════════════════
   NOTICES AND VALIDATION
   ══════════════════════════════════════ */

.wc-block-components-notice-banner {
    padding: 10px 12px !important;
    margin-bottom: 12px !important;
    font-size: 13px !important;
    border: 1px solid !important;
}

.wc-block-components-notice-banner.is-error {
    background: #ffe8e8 !important;
    border-color: #cc0000 !important;
    color: #880000 !important;
}

.wc-block-components-notice-banner.is-success {
    background: #e8ffe8 !important;
    border-color: #008800 !important;
    color: #006600 !important;
}

.wc-block-components-notice-banner.is-info {
    background: #e8f4ff !important;
    border-color: #0066cc !important;
    color: #004488 !important;
}

.wc-block-components-validation-error {
    font-size: 11px !important;
    color: #cc0000 !important;
    margin-top: 4px !important;
}

/* ══════════════════════════════════════
   RESPONSIVE - Cart & Checkout
   ══════════════════════════════════════ */

@media (max-width: 800px) {
    .wc-block-components-sidebar-layout,
    .wc-block-cart,
    .wc-block-checkout {
        flex-direction: column !important;
    }

    .wc-block-components-sidebar,
    .wc-block-cart__sidebar,
    .wc-block-checkout__sidebar {
        flex: none !important;
        width: 100% !important;
        order: 2 !important;
    }

    .wc-block-components-main,
    .wc-block-cart__main,
    .wc-block-checkout__main {
        width: 100% !important;
    }

    .wc-block-components-address-form {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .wc-block-cart-items__row {
        flex-wrap: wrap !important;
    }

    .wc-block-cart-item__image {
        flex: 0 0 48px !important;
        width: 48px !important;
    }

    .wc-block-cart-item__image img {
        width: 44px !important;
        height: 44px !important;
    }

    .wc-block-cart-item__total {
        flex: 0 0 100% !important;
        text-align: left !important;
        margin-top: 8px !important;
        padding-top: 8px !important;
        border-top: 1px dotted #c0c0c0 !important;
    }
}
