/* ==========================================================================
   Customer Account Pages Styling
   ========================================================================== */

/* --- Layout Container --- */
.account-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
}

/* --- Sidebar Navigation --- */
.col-left.sidebar {
    width: 250px;
    min-width: 250px;
    flex-shrink: 0;
}

.block-account-nav {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
}

.block-account-nav .block-title {
    background: #1a1a1a;
    padding: 15px 20px;
    margin: 0;
    border: none;
}

.block-account-nav .block-title strong {
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.block-account-nav ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.block-account-nav ul li {
    margin: 0;
    list-style: none;
}

.block-account-nav ul li a {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.block-account-nav ul li a:hover {
    background: #f0f0f0;
    color: #1a1a1a;
    border-left-color: #1a1a1a;
}

.block-account-nav ul li.current a,
.block-account-nav ul li.current strong {
    display: block;
    padding: 10px 20px;
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    border-left: 3px solid #1a1a1a;
}

/* Log Out Link */
.block-account-nav ul li:last-child {
    border-top: 1px solid #eee;
    margin-top: 5px;
    padding-top: 5px;
}

.block-account-nav ul li a[href*="logout"] {
    color: #c00;
}

.block-account-nav ul li a[href*="logout"]:hover {
    background: #c00;
    color: #fff;
    border-left-color: #c00;
}

/* --- Main Content Area --- */
.col-main {
    flex: 1;
    min-width: 0;
}

/* Page Title */
.my-account .page-title {
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.my-account .page-title h1 {
    font-size: 22px;
    margin: 0;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Welcome Message */
.welcome-msg {
    margin-bottom: 20px;
    font-size: 15px;
    color: #555;
}

/* --- Dashboard Boxes --- */
.box-account {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 20px;
}

.box-account .box-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.box-account .box-head h2 {
    font-size: 16px;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.box-account .box-head a {
    color: #1a1a1a;
    font-size: 13px;
    text-decoration: underline;
}

address {
    font-style: normal;
    line-height: 1.6;
    color: #666;
}

/* Dashboard info boxes side by side */
.col2-set {
    display: flex;
    gap: 20px;
}

.col2-set .col-1,
.col2-set .col-2 {
    flex: 1;
}

/* --- Tables (Orders, Reviews, Addresses) --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.data-table thead th {
    background: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 14px;
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: #fafafa;
}

.data-table a {
    color: #1a1a1a;
    text-decoration: underline;
    margin-right: 10px;
}

.data-table a:hover {
    color: #555;
}

/* --- Forms (Edit Account, Address) --- */
.form-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-list li {
    margin-bottom: 18px;
    list-style: none;
}

.form-list label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.form-list label em {
    color: #c00;
    font-style: normal;
}

.form-list input.input-text,
.form-list select,
.form-list textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 0;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-list input.input-text:focus,
.form-list select:focus {
    border-color: #1a1a1a;
    outline: none;
}

/* Fieldset */
fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}

legend {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    width: 100%;
}

/* Buttons */
.buttons-set {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buttons-set .back-link a {
    color: #666;
    text-decoration: none;
}

.buttons-set .back-link a:hover {
    color: #1a1a1a;
}

.button,
button.button {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}

.button:hover,
button.button:hover {
    background: #333;
}

/* Wishlist */
.my-wishlist .data-table .product-name {
    font-weight: 600;
}

/* Image container - fit to image size and center */
.my-wishlist .data-table .product-image {
    display: block;
    text-align: center;
    line-height: 0;
}

.my-wishlist .data-table .product-image img {
    width: 95%;
    height: auto;
    object-fit: cover;
    display: inline-block;
}

/* Remove button styling - no circle icon */
.my-wishlist .btn-remove,
.my-wishlist .btn-remove2 {
    display: inline-block;
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 12px;
    color: #c00;
    border: 1px solid #ddd;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: none;
}

/* Remove the red circle icon */
.my-wishlist .btn-remove::before,
.my-wishlist .btn-remove2::before,
.my-wishlist .btn-remove::after,
.my-wishlist .btn-remove2::after {
    display: none !important;
    content: none !important;
}

.my-wishlist .btn-remove:hover,
.my-wishlist .btn-remove2:hover {
    background: #c00;
    color: #fff;
    border-color: #c00;
}

/* Pager / Toolbar */
.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

/* --- Mobile Toggle Button (hidden on PC) --- */
.account-menu-toggle {
    display: none;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 767px) {
    .account-container {
        flex-direction: column;
        gap: 0;
        padding: 15px 12px;
        overflow-x: hidden;
    }

    /* Mobile Toggle Button - visible */
    .account-menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #1a1a1a;
        color: #fff;
        border: none;
        padding: 12px 20px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        width: 100%;
        margin-bottom: 15px;
        box-sizing: border-box;
    }

    .account-menu-toggle .toggle-icon {
        font-size: 18px;
    }

    .account-menu-toggle.active {
        background: #333;
    }

    /* Sidebar - hidden by default, dropdown on click */
    .col-left.sidebar {
        width: 100%;
        min-width: 100%;
        display: none;
        margin-bottom: 15px;
    }

    .col-left.sidebar.active {
        display: block;
    }

    .block-account-nav {
        border-radius: 0;
    }

    .block-account-nav .block-title {
        display: none;
        /* Hidden since toggle button serves as title */
    }

    /* Main content full width */
    .col-main {
        width: 100%;
        overflow-x: hidden;
    }

    .my-account .page-title h1 {
        font-size: 18px;
    }

    /* Stack info boxes */
    .col2-set {
        flex-direction: column;
        gap: 15px;
    }

    .col2-set .col-1,
    .col2-set .col-2 {
        width: 100%;
        float: none;
    }

    /* ======== Mobile Tables - Card Layout ======== */
    .data-table {
        border: none;
    }

    .data-table thead {
        display: none;
        /* Hide table headers */
    }

    .data-table tbody tr {
        display: block;
        border: 1px solid #eee;
        margin-bottom: 12px;
        padding: 12px;
        background: #fff;
    }

    .data-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 6px 0;
        border-bottom: 1px solid #f5f5f5;
        font-size: 13px;
        word-break: break-word;
    }

    .data-table tbody td:last-child {
        border-bottom: none;
    }

    .data-table tbody td:before {
        content: attr(data-th);
        font-weight: 600;
        color: #333;
        margin-right: 10px;
        min-width: 90px;
        flex-shrink: 0;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .data-table td .nobr {
        white-space: normal;
    }

    .data-table a {
        margin-right: 5px;
    }

    /* ======== Wishlist Mobile - Card Layout ======== */
    .my-wishlist .data-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
    }

    .my-wishlist .data-table tbody td {
        display: block;
        width: 100%;
        padding: 0;
        border-bottom: none;
    }

    .my-wishlist .data-table tbody td:before {
        display: none;
        /* No labels needed for wishlist cards */
    }

    /* Wishlist product image */
    .my-wishlist .data-table tbody td.customer-wishlist-item-image {
        width: 80px;
        flex-shrink: 0;
    }

    .my-wishlist .data-table tbody td.customer-wishlist-item-image img {
        width: 80px;
        height: auto;
    }

    /* Wishlist product info */
    .my-wishlist .data-table tbody td.customer-wishlist-item-info {
        flex: 1;
        min-width: 0;
    }

    .my-wishlist .data-table tbody td.customer-wishlist-item-info .product-name {
        font-size: 14px;
        line-height: 1.4;
    }

    .my-wishlist .data-table tbody td.customer-wishlist-item-info .description {
        display: none;
        /* Hide duplicate description on mobile */
    }

    /* Wishlist comment box */
    .my-wishlist .data-table textarea {
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        font-size: 13px;
        padding: 8px;
        height: 50px;
    }

    /* Wishlist cart column */
    .my-wishlist .data-table .customer-wishlist-item-cart {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        width: 100%;
    }

    .my-wishlist .data-table .customer-wishlist-item-cart .price {
        font-weight: 600;
        font-size: 15px;
    }

    .my-wishlist .data-table .customer-wishlist-item-cart input.qty {
        width: 50px !important;
        text-align: center;
    }

    .my-wishlist .data-table .customer-wishlist-item-cart button {
        flex: 1;
        min-width: 120px;
        padding: 10px;
        font-size: 12px;
    }

    /* Wishlist remove/edit links */
    .my-wishlist .data-table .customer-wishlist-item-remove {
        text-align: right;
    }

    /* Wishlist buttons set */
    .my-wishlist .buttons-set {
        flex-direction: column;
        gap: 8px;
    }

    .my-wishlist .buttons-set button,
    .my-wishlist .buttons-set .button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    /* ======== Forms on mobile ======== */
    .form-list input.input-text,
    .form-list select {
        max-width: 100%;
    }

    .buttons-set {
        flex-direction: column;
        gap: 10px;
    }

    .buttons-set .button,
    .buttons-set button {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* ======== Dashboard boxes on mobile ======== */
    .box-account {
        padding: 15px;
        overflow-x: hidden;
    }

    .box-account .box-head {
        flex-wrap: wrap;
        gap: 5px;
    }

    .box-account .box-head h2 {
        font-size: 15px;
    }
}

/* ==========================================================================
   Tablet & Desktop (>767px)
   ========================================================================== */
@media (min-width: 768px) {
    .account-menu-toggle {
        display: none !important;
    }

    .col-left.sidebar {
        display: block !important;
    }
}