/* --- WOOCOMMERCE ORDERS CARD LAYOUT (DIV BASED) --- */

.sl-orders-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* Main Card Wrapper */
/* --- ORDERS PAGE: MATCHING POPPING CARD STYLE --- */

.sl-order-card {
    background-color: #fafafa; /* Using the custom color you requested earlier */
    border: 1px solid #e5e7eb;
    border-radius: 12px; /* Matching the 12px radius of the other sections */
    overflow: hidden;
    margin-bottom: 20px; /* Spacing between cards */
    
    /* The heavy spread box-shadow to make it pop */
    box-shadow: 0 20px 50px 0px rgba(0, 0, 0, 0.18);
    
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Enhanced hover to match the heavier shadow */
.sl-order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px 2px rgba(0, 0, 0, 0.22);
}

/* Ensure the header and footer inside the card align with the new radius */
.sl-card-header {
    background-color: rgba(0, 0, 0, 0.00); /* Very subtle tint for the header */
    border-bottom: 1px solid #e5e7eb;
    padding: 24px !important;
}

.sl-card-footer {
    background-color: #fafafa;
    border-top: 1px solid #e5e7eb;
    padding: 20px 24px !important;
}

/* 1. Header Section */
.sl-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.sl-order-number {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0 !important;
    padding: 0;
    border: none;
}

.sl-order-date {
    font-size: 14px;
    color: #9ca3af;
}

/* Status Badges */
.sl-status-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Specific Status Colors based on screenshots */
.sl-status-pending,
.sl-status-on-hold {
    color: #111827;
}

.sl-status-processing {
    background-color: #e0f2fe;
    color: #0284c7;
    padding: 6px 14px;
    border-radius: 9999px;
}

.sl-status-completed {
    background-color: #dcfce7;
    color: #166534;
    padding: 6px 14px;
    border-radius: 9999px;
}

/* 2. Middle Section (Products) */
.sl-card-body {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.sl-product-item {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 250px; /* Keeps items compact like the screenshot */
}

/* --- FIXED PRODUCT IMAGE STYLING --- */

/* --- BRUTE FORCE PRODUCT IMAGE RE-STYLING --- */

/* --- FIXED PRODUCT IMAGE: TALL/PORTRAIT (COVER) STYLING --- */




.sl-product-details {
    display: flex;
    flex-direction: column;
}

.sl-product-title {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.4;
    margin-bottom: 4px;
}

.sl-product-price {
    font-size: 14px;
    color: #9ca3af;
}

/* 3. Footer Section (Totals & Buttons) */
.sl-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: #fafafa;
}

.sl-footer-left {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.sl-item-count {
    font-size: 14px;
    color: #9ca3af;
}

.sl-order-total {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.sl-order-total .woocommerce-Price-amount {
    font-weight: 700;
}

/* View Details Button */
.sl-action-btn {
    display: inline-block;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #111827;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.sl-action-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

/* --- WOOCOMMERCE ADDRESSES (GLASSMORPHISM CARDS) --- */

.sl-address-description {
    margin-bottom: 24px;
    color: #6b7280;
}

.sl-addresses-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 24px;
}

/* The Frosted Glass Base */
.sl-glass-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.05), /* Base shadow */
        inset 0 0 0 1px rgba(255, 255, 255, 0.4); /* Inner rim light */
}

/* Simulated Tech Texture overlay at the top of the card */
.sl-glass-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.sl-glass-inner {
    position: relative;
    z-index: 1;
}

.sl-glass-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.sl-glass-title {
    font-size: 24px;
    font-weight: 800;
    color: #374151; /* Dark Slate */
    margin: 0 !important;
    line-height: 1.3;
    letter-spacing: 1px;
    border: none;
    padding: 0;
}

/* The Glowing Edit Button */
.sl-glass-edit-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.sl-edit-text {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 1);
    padding: 8px 32px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    backdrop-filter: blur(8px);
    /* Cyan and Purple subtle edge glows */
    box-shadow: 
        0 4px 12px rgba(6, 182, 212, 0.15), 
        inset 0 0 8px rgba(236, 72, 153, 0.1);
    transition: all 0.3s ease;
    z-index: 2;
}

/* Fake bottom tab with icon */
.sl-edit-glow-tab {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: none;
    padding: 4px 16px 2px 16px;
    border-radius: 0 0 10px 10px;
    font-size: 10px;
    margin-top: -4px;
    z-index: 1;
    /* Cyan text glow effect */
    text-shadow: 0 0 5px rgba(6, 182, 212, 0.8);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.1);
    transition: all 0.3s ease;
}

.sl-glass-edit-btn:hover .sl-edit-text {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(6, 182, 212, 0.25), 
        inset 0 0 12px rgba(236, 72, 153, 0.15);
}

.sl-glass-edit-btn:hover .sl-edit-glow-tab {
    transform: translateY(-2px);
}

/* Address Text Styling */
.sl-glass-body {
    font-style: normal;
    font-size: 15px;
    line-height: 2;
    color: #4b5563; /* Medium Gray */
}

/* --- WOOCOMMERCE EDIT ACCOUNT FORM (CARD LAYOUT) --- */

.woocommerce-account .woocommerce-MyAccount-content form.edit-account {
    background-color: #ffffff; /* Clean white background */
    border: 1px solid #e5e7eb; /* Subtle edge border */
    border-radius: 12px; /* Smooth rounded corners */
    padding: 40px; /* Plenty of breathing room inside the box */
    
    /* Heavy spread box-shadow to make it pop off the page */
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12);
    
    /* Optional: constrain the width so inputs don't stretch too far on big screens */
    max-width: 700px; 
}

/* Adds a nice clean divider above the "Password change" section inside the form */
.woocommerce-account .woocommerce-MyAccount-content form.edit-account fieldset {
    background: transparent;
    border: none;
    margin: 32px 0 0 0;
    padding: 32px 0 0 0;
    border-top: 1px solid #e5e7eb;
}

.woocommerce-account .woocommerce-MyAccount-content form.edit-account fieldset legend {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    padding: 0;
}


/* --- WOOCOMMERCE EDIT ADDRESS FORMS (CARD LAYOUT) - CORRECTED --- */

body.woocommerce-edit-address .woocommerce-MyAccount-content form {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12);
    max-width: 700px; 
}

/* Give the form title a bit of breathing room at the top */
body.woocommerce-edit-address .woocommerce-MyAccount-content h3 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

/* --- WOOCOMMERCE VIEW ORDER PAGE (GUARANTEED CARD LAYOUT) --- */

/* 1. Order Details Section (Top Card) - Brute Force Override */
.woocommerce-MyAccount-content > section:first-of-type,
.woocommerce-MyAccount-content .woocommerce-order-details {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 40px !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12) !important;
    margin-bottom: 40px !important;
}

.woocommerce-MyAccount-content > section:first-of-type > h2,
.woocommerce-MyAccount-content .woocommerce-order-details > h2 {
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* 2. Customer Details Section (The New PHP Override) */
.sl-view-order-addresses {
    margin-top: 40px;
}

.sl-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.sl-address-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12);
}

.sl-address-card-full {
    max-width: 700px;
}

.sl-address-title {
    margin-top: 0;
    margin-bottom: 24px !important;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.sl-address-content {
    margin: 0;
    padding: 0;
    border: none;
    font-style: normal;
    line-height: 1.8;
    color: #4b5563;
}

.sl-address-phone, 
.sl-address-email {
    margin: 8px 0 0 0;
    color: #6b7280;
}

/* --- VIEW ORDER MAIN OVERRIDE --- */

/* 1. Top Order Details Card */
.sl-view-order-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12);
    margin-bottom: 40px;
}

.sl-view-order-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

/* Order Table Formatting */
.sl-order-table {
    width: 100%;
    border-collapse: collapse;
}

.sl-order-table th, 
.sl-order-table td {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    color: #4b5563;
}

.sl-order-table tfoot th {
    color: #111827;
}

/* 2. Addresses Side-by-Side Cards */
.sl-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.sl-address-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12);
}

.sl-address-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.sl-address-content {
    margin: 0;
    padding: 0;
    border: none;
    font-style: normal;
    line-height: 1.8;
    color: #4b5563;
}

.sl-address-phone, 
.sl-address-email {
    margin: 8px 0 0 0;
    color: #6b7280;
}


/* --- CLOTYA VIEW ORDER SPECIAL OVERRIDE --- */

/* 1. Make the Order Details Card pop */
.clotya-view-order-page .clotya-order-details-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12) !important;
    margin-bottom: 30px !important;
}

/* 2. Target the Customer Details Container in Clotya */
/* Clotya usually wraps addresses in a 'clotya-customer-details' or similar div */
.clotya-view-order-page .woocommerce-customer-details {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}

/* 3. Force Billing & Shipping columns to be side-by-side cards */
.clotya-view-order-page .woocommerce-column,
.clotya-view-order-page .woocommerce-column--billing-address,
.clotya-view-order-page .woocommerce-column--shipping-address {
    flex: 1 !important;
    min-width: 300px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12) !important;
    float: none !important; /* Kill theme floats */
    width: auto !important;
}

/* 4. Style the table inside Clotya's card to be cleaner */
.clotya-order-items-table {
    border: none !important;
}

.clotya-order-items-table th, 
.clotya-order-items-table td {
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 15px 0 !important;
}

/* 5. Clean up Headings */
.clotya-view-order-page .card-title,
.clotya-view-order-page .woocommerce-column__title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 20px !important;
    text-transform: none !important;
}

/* --- CLOTYA VIEW ORDER: ADDRESS CARD FIX --- */

/* 1. Target the wrapper that holds both Billing and Shipping */
/* We look for the div immediately preceding the 'Order Notes' comment */
.clotya-view-order-page .clotya-order-details-card + div {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    background: transparent !important;
    margin-bottom: 30px !important;
}

/* 2. Style the individual Billing and Shipping cards to match the pop effect */
.clotya-view-order-page .clotya-address-card {
    flex: 1 !important;
    min-width: 300px !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12) !important;
    margin: 0 !important; /* Reset theme margins */
}

/* 3. Style the Title inside the address cards */
.clotya-address-card .card-title {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* 4. Clean up the address text layout */
.clotya-address-card address {
    font-style: normal !important;
    line-height: 1.8 !important;
    color: #4b5563 !important;
    margin: 0 !important;
}

.clotya-address-card address br {
    display: block !important;
    content: "" !important;
    margin-top: 5px !important;
}

/* 5. Style the phone and email lines inside the address */
.clotya-address-card .address-phone,
.clotya-address-card .address-email {
    margin: 10px 0 0 0 !important;
    font-size: 14px !important;
    color: #6b7280 !important;
}

/* --- CUSTOM DASHBOARD GRID LAYOUT --- */

/* Reset WooCommerce defaults on the dashboard text */
.woocommerce-account .woocommerce-MyAccount-content > p {
    display: none; /* Hides default "Hello, you can manage..." text */
}

.sl-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

/* Base Card Style (Matching consistency) */
.sl-dashboard-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12);
}

.sl-card-title {
    margin-top: 0;
    margin-bottom: 24px !important;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

/* --- TOP GRID (Profile & Tracker) --- */
.sl-dashboard-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* CARD A: Profile Hub */
.sl-profile-hub {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sl-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.sl-profile-avatar img,
.sl-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    color: #9ca3af;
    font-size: 32px;
    font-weight: 700;
}

.sl-welcome-text {
    font-size: 14px;
    color: #6b7280;
}

.sl-username {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 4px 0 0 0 !important;
}

/* Track Order Button */
.sl-btn-track-order {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #111827;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.sl-btn-track-order:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* CARD B: Order Tracker */
.sl-order-tracker {
    display: flex;
    flex-direction: column;
}

.sl-processing-order .sl-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.sl-order-number {
    font-weight: 700;
    color: #111827;
}

.sl-status-processing {
    background-color: #e0f2fe;
    color: #0284c7;
    padding: 4px 12px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.sl-order-items-preview {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.sl-item-thumb img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.sl-item-more {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    background-color: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.sl-btn-view-details {
    display: inline-block;
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.sl-no-processing-order {
    text-align: center;
    color: #6b7280;
    padding: 24px 0;
}

.sl-no-order-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

/* --- BOTTOM: Recommended Section --- */
.sl-recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.sl-rec-product-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.sl-rec-product-card:hover {
    transform: translateY(-3px);
}

.sl-rec-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.sl-rec-name {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 4px;
}

.sl-rec-price {
    font-weight: 700;
    color: #111827;
}

.sl-rec-price .amount {
    font-weight: 700;
}

/* --- FIXED PRODUCT IMAGE: TALL/PORTRAIT (COVER) STYLING --- */

/* 1. Set a taller, narrow container to match vertical photos */
.sl-product-image {
    width: 60px !important;
    height: 75px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    overflow: hidden !important; /* This creates the clean "crop" */
    padding: 0 !important; /* Removing padding to maximize image size */
    margin: 0 !important;
}

/* 2. Configure the image to cover the vertical space */
.sl-product-image img {
    width: 100% !important; 
    height: 100% !important; 
    
    /* Magic Phrase: Stretch to cover the box, 
       prioritizing the height and cropping the width. */
    object-fit: cover !important; 
    
    /* Ensure the top of the t-shirt (the logo/neckline) 
       is always visible at the top of the box. */
    object-position: top center !important; 
    
    /* Strip theme scaling/transforms (still necessary for Clotya) */
    transform: none !important; 
    scale: 1 !important;
    
    /* Reset all standard image styling */
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}