/* ProVeterinary Theme - Basic Customizations */

/* Hide product images in sidebar wishlist widget */
.sidebar .block-wishlist .product-item-photo {
    display: none !important;
}

/* Fix WEEE display issue */
.price-container .weee:after {
    display: none !important;
}

/* Fix top navigation links to be white on green background */
.navigation ul li a {
    color: #ffffff !important;
    text-transform: uppercase !important;
}

.navigation ul li a:hover {
    color: #ffffff !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Fix dropdown submenu children visibility - dark text on white background */
.navigation .submenu a,
.navigation .level-top .submenu a,
.navigation ul li ul li a,
.navigation .level0 .submenu .level1 > a,
.navigation .level0 .submenu .level2 > a {
    color: #333333 !important;
    background-color: #ffffff !important;
    text-transform: capitalize !important;
}

.navigation .submenu a:hover,
.navigation .level-top .submenu a:hover,
.navigation ul li ul li a:hover {
    color: #56AD3F !important;
    background-color: #f8f9fa !important;
}

/* Basic theme customizations - advanced features handled by module *//* ===== MINI CART STYLING ===== */

/* Hide product images in mini cart */
.minicart-items .product-image-container,
.minicart-items .product-item-photo {
    display: none !important;
}

/* Make mini cart more compact */
.minicart-items-wrapper .product-item {
    padding: 10px 0 !important;
    border-bottom: 1px solid #e5e5e5;
}

.minicart-items-wrapper .product-item-details {
    padding-left: 0 !important;
}

.minicart-items-wrapper .product-item-name {
    margin-bottom: 5px !important;
}

/* Increase size of delete and edit icons in mini cart */
.minicart-items .action.delete,
.minicart-items .action.edit {
    width: 24px !important;
    height: 24px !important;
    font-size: 18px !important;
}

/* Change edit icon from heart to pencil */
.minicart-items .action.edit:before {
    content: '\e601' !important; /* Pencil icon */
}

/* Make actions more visible */
.minicart-items .product .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== CART PAGE STYLING ===== */

/* Hide product images on cart page */
.checkout-cart-index .cart.table .item-info .product-item-photo {
    display: none !important;
}

.checkout-cart-index .cart.table .col.item {
    padding-left: 10px !important;
}

/* Make cart table more condensed */
.checkout-cart-index .cart.table tbody > tr > td {
    padding: 10px 5px !important;
}

.checkout-cart-index .cart.item {
    padding: 10px 0 !important;
}

/* Increase size of delete icon on cart page */
.checkout-cart-index .action.action-delete {
    width: 24px !important;
    height: 24px !important;
    font-size: 18px !important;
}

/* Change edit icon from heart to pencil on cart page */
.checkout-cart-index .action.towishlist:before,
.checkout-cart-index .action-towishlist:before {
    content: '\e601' !important; /* Pencil icon */
    font-size: 18px !important;
}

.checkout-cart-index .action.towishlist,
.checkout-cart-index .action-towishlist {
    width: 24px !important;
    height: 24px !important;
}

.message.success>*:first-child:before,.message.error>*:first-child:before,message.warning>*:first-child:before,.message.notice>*:first-child:before {
    font-size: 16px !important;
}
.breadcrumbs .item:not(:last-child):after {
    font-size: 10px !important
}

.checkout-payment-method .payment-option-title .action-toggle:after {
    font-size: 14px !important;
}

/* Fix pagination arrows font size */
.pages .action.next:before,
.pages .action.next:after,
.pages .action.previous:before,
.pages .action.previous:after {
    font-size: 14px !important;
    margin: 0 !important;
}

/* Make Account text white in mobile view */
@media (max-width: 767px) {
    .customer-welcome .action.switch,
    .customer-welcome .customer-name {
        color: #ffffff !important;
    }
    
    .panel.header .links > li > a {
        color: #ffffff !important;
    }
    
    /* Fix Menu and Account links in mobile header - make them white and larger */
    .panel.header .header.links,
    .panel.header .header.links > li > a,
    .authorization-link a {
        color: #ffffff !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Navigation toggle (hamburger menu text) */
    .nav-toggle {
        color: #ffffff !important;
        font-size: 16px !important;
        font-weight: 600 !important;
    }
}

/* ===== MOBILE MENU STYLING ===== */

/* Force all mobile menu text to be white */
@media (max-width: 767px) {
    .navigation .ui-menu .ui-menu-item a,
    .navigation .level0,
    .navigation .level1,
    .navigation .level2,
    .navigation ul li a,
    .nav-sections .navigation a,
    .nav-sections-item-content a,
    .nav-sections-item-content .ui-menu-item a {
        color: #ffffff !important;
    }
    
    /* Fix welcome greeting to be white */
    .nav-sections .header.links li.greet.welcome {
        color: #ffffff !important;
    }
    
    /* Fix menu toggle links at top - make them white */
    .nav-sections-item-title a {
        color: #ffffff !important;
        font-size: 16px !important;
        font-weight: 600 !important;
    }
    
    /* Fix active menu items - make them dark for readability with no background */
    .nav-sections-item-title.active a,
    .navigation .level0.active > a,
    .navigation .level1.active > a,
    .navigation .level2.active > a,
    .navigation .ui-menu .ui-menu-item.active > a,
    .nav-sections-item-content.active a {
        color: #333333 !important;
        background: inherit !important;
    }
}

/* ===== CART PAGE WISHLIST TOGGLE ICONS ===== */

/* Use heart icons instead of pencil for wishlist toggle on cart page */
.cart.table-wrapper .action.towishlist:before {
    content: '\2661' !important; /* Empty heart */
    font-family: 'luma-icons' !important;
    font-size: 13px !important;
}

.cart.table-wrapper .action.towishlist.added:before {
    content: '\e600' !important; /* Filled heart */
    font-family: 'luma-icons' !important;
    font-size: 13px !important;
}

/* ===== PRODUCT NOTICES (MIN/MAX QTY, SIC REQUIRED) ===== */

.product-notice {
    display: block !important;
    width: 100%;
    padding: 8px 12px;
    margin: 4px 0;
    font-size: 12px;
    line-height: 1.4;
    border-left: 3px solid;
    background-color: #f8f9fa;
}

.product-notice strong {
    font-weight: 600;
}

.min-order-notice {
    border-left-color: #1979c3;
    color: #1979c3;
}

.max-order-notice {
    border-left-color: #ff9800;
    color: #ff9800;
}

.sic-required-notice {
    border-left-color: #e91e63;
    color: #e91e63;
}

.sic-required-notice a {
    color: #e91e63 !important;
    text-decoration: underline;
    font-weight: 600;
}

.sic-required-notice a:hover {
    color: #c2185b !important;
}

/* ===== PRODUCT NOTICES (MIN/MAX QTY, SIC, REQUISITION) ===== */

.product-notice {
    color: #d32f2f;
    font-size: 12px;
    font-weight: 400;
    margin: 4px 0;
    padding: 8px 10px;
    line-height: 1.4;
    display: block;
    clear: both;
    background-color: #fff3e0;
    border-left: 3px solid #ff9800;
}

.product-notice strong {
    font-weight: 600;
    color: #e65100;
}

.product-notice a {
    color: #1979c3 !important;
    text-decoration: underline;
}

.product-notice a:hover {
    color: #006bb4 !important;
    text-decoration: none;
}

/* Different colors for different notice types */
.min-order-notice {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

.min-order-notice strong {
    color: #1565c0;
}

.max-order-notice {
    background-color: #fff3e0;
    border-left-color: #ff9800;
}

.max-order-notice strong {
    color: #e65100;
}

.sic-required-notice {
    background-color: #fce4ec;
    border-left-color: #e91e63;
}

.sic-required-notice strong {
    color: #c2185b;
}

/* ===== HEADER TOP PANEL - WHITE LINKS ===== */

/* Make all links in the top header panel white */
.panel.header .header.links a,
.panel.header .header.links > li > a,
.panel.header .authorization-link a,
.panel.header a {
    color: #ffffff !important;
}

.panel.header .header.links a:hover,
.panel.header .authorization-link a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: underline;
}

/* Hide wishlist counter in top header bar (keeps it clean) */
.panel.header .header.links .link.wishlist .counter.qty {
    display: none !important;
}

/* Remove the 'or' separator that Luma renders via ::after on authorization-link */
.panel.header .header.links > .authorization-link::after,
.panel.header .header.links > .authorization-link:after {
    display: none !important;
    content: none !important;
}

/* ===== CART SIDEBAR - CONTINUE SHOPPING / OR / CHECKOUT NOW ===== */

/* Spacing for the continue shopping wrapper */
.cart-summary .cart-continue-shopping {
    margin-bottom: 0;
    text-align: center;
}

/* Continue Shopping button - secondary style */
.action-continue-shopping {
    display: inline-block;
    width: 100%;
    padding: 10px 20px;
    margin-bottom: 8px;
    background-color: #ffffff;
    border: 2px solid #56AD3F;
    color: #56AD3F !important;
    text-align: center;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    box-sizing: border-box;
    border-radius: 3px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.action-continue-shopping:hover {
    background-color: #56AD3F;
    color: #ffffff !important;
}

/* "or" separator between Continue Shopping and Checkout Now */
.cart-or-separator {
    text-align: center;
    position: relative;
    margin: 8px 0;
    color: #999;
    font-size: 12px;
    line-height: 1;
}

.cart-or-separator:before,
.cart-or-separator:after {
    content: '';
    display: inline-block;
    width: 40%;
    height: 1px;
    background: #e0e0e0;
    vertical-align: middle;
    margin: 0 6px;
}

/* Checkout Now button spacing */
.cart-summary .checkout-methods-items {
    margin: 0;
    padding: 0;
}

/* ===== CHECKOUT PAGE - CONTINUE SHOPPING BUTTON (INLINE WITH NEXT) ===== */

/* Add spacing between shipping methods list and action buttons */
#co-shipping-method-form .table-checkout-shipping-method {
    margin-bottom: 24px;
}

/* Continue Shopping far left, Next far right */
.opc-shipping-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
    gap: 16px;
    margin-top: 24px;
}

.opc-shipping-actions::before,
.opc-shipping-actions::after {
    display: none !important;
}

.opc-shipping-actions .secondary {
    display: block !important;
    float: none !important;
    width: auto !important;
    order: 1;
}

.opc-shipping-actions .primary {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin-left: auto !important;
    order: 2;
}

.opc-shipping-actions .action-continue-shopping {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid #b0b0b0;
    border-radius: 3px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.15s, color 0.15s;
}

.opc-shipping-actions .action-continue-shopping:hover {
    border-color: #777;
    color: #222;
}

/* ===== WISHLIST / MY FAVOURITES - CONTINUE SHOPPING BUTTON (BOTTOM LEFT) ===== */

.wishlist-actions-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.wishlist-continue-shopping {
    margin-left: auto;
    width: auto !important;
    display: inline-block !important;
    padding: 10px 20px !important;
}


.product-item .product-notice {
    max-width: 100%;
    margin-top: 6px;
}

/* ===== HEADER SEARCH AUTOCOMPLETE DROPDOWN ===== */

.ui-autocomplete.ui-widget-content {
    position: absolute;
    z-index: 9999 !important;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.ui-autocomplete.ui-widget-content .ui-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.ui-autocomplete.ui-widget-content .ui-menu-item:last-child {
    border-bottom: none;
}

.ui-autocomplete.ui-widget-content .ui-menu-item .ui-menu-item-wrapper {
    padding: 0;
    cursor: pointer;
    display: block;
}

.ui-autocomplete.ui-widget-content .ui-menu-item .ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete.ui-widget-content .ui-menu-item .ui-menu-item-wrapper:hover {
    background: #f5f5f5;
    border: none;
    margin: 0;
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
}

.search-autocomplete-item .item-name {
    flex: 1;
    font-size: 13px;
    color: #333;
    line-height: 1.3;
}

.search-not-logged-in {
    padding: 10px 12px;
    font-size: 13px;
    color: #888;
    font-style: italic;
    cursor: default;
}

.search-login-required .ui-menu-item-wrapper:hover,
.search-login-required .ui-menu-item-wrapper.ui-state-active {
    background: transparent !important;
    cursor: default;
}

/* ===== ORDER VIEW PAGE - INFO GRID ===== */

.provet-order-info {
    margin-bottom: 24px;
}

.provet-order-info .block-content {
    padding: 0;
}

.provet-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.provet-info-box {
    padding: 14px 18px;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.provet-info-box:nth-child(even) {
    border-right: none;
}

.provet-info-box:nth-last-child(-n+2) {
    border-bottom: none;
}

.provet-info-box .box-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #56AD3F;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.provet-info-box address {
    font-style: normal;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.provet-info-box p {
    font-size: 13px;
    margin: 0;
    color: #444;
}

.provet-info-box .payment-method {
    font-size: 13px;
    color: #444;
}

/* Smaller product name in order items table */
.sales-order-view .table-order-items .col.name,
.account .table-order-items .col.name {
    font-size: 13px;
}

.sales-order-view .table-order-items .col.name a,
.account .table-order-items .col.name a {
    font-size: 13px;
}

/* ===== HIDE NEWS_BLOCK ON PRINT ===== */

@media print {
    .news_block,
    [class*="news-block"],
    [class*="newsblock"],
    #news_block,
    #news-block {
        display: none !important;
    }
}

/* ===== GLOBAL PRINT STYLES ===== */

@media print {
    /* Reset layout containers that cause blank first page */
    html, body {
        height: auto !important;
        min-height: 0 !important;
    }

    .page-wrapper {
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .page-main {
        flex-grow: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .account .page-main {
        padding-top: 0 !important;
    }

    .columns, .column.main {
        min-height: 0 !important;
        height: auto !important;
    }

    /* Constrain logo size in print */
    .page-print .logo img,
    .logo img {
        max-height: 50pt !important;
        width: auto !important;
    }

    /* Smaller base font */
    body, .page-print {
        font-size: 10pt !important;
        color: #333333 !important;
        background: #fff !important;
    }

    /* Green headings */
    h1, h2, h3, h4, h5 {
        color: #56AD3F !important;
        background: transparent !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    h1 { font-size: 16pt !important; margin: 0 0 8pt !important; }
    h2 { font-size: 13pt !important; margin: 0 0 6pt !important; }
    h3 { font-size: 11pt !important; margin: 0 0 4pt !important; }
    h4, h5 { font-size: 10pt !important; margin: 0 0 4pt !important; }

    p, address, td, th, li, span, strong, div {
        color: #333333 !important;
        font-size: 10pt !important;
        line-height: 1.4 !important;
    }

    a, a:visited {
        color: #333333 !important;
        text-decoration: none !important;
    }

    /* ===== ORDER PRINT: INFO GRID ===== */

    .provet-order-info {
        margin: 0 0 12pt !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .provet-order-info .block-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .provet-info-grid {
        display: table !important;
        width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        border: 1pt solid #cccccc !important;
        border-radius: 0 !important;
    }

    .provet-info-box {
        display: table-cell !important;
        width: 50% !important;
        box-sizing: border-box !important;
        padding: 6pt 10pt !important;
        border-right: 1pt solid #cccccc !important;
        border-bottom: 1pt solid #cccccc !important;
        border-radius: 0 !important;
        vertical-align: top !important;
    }

    .provet-info-box:nth-child(even) {
        border-right: none !important;
    }

    .provet-info-box:nth-last-child(-n+2) {
        border-bottom: none !important;
    }

    .provet-info-box .box-title {
        display: block !important;
        font-size: 9pt !important;
        font-weight: 700 !important;
        color: #56AD3F !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3pt !important;
        margin-bottom: 4pt !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .provet-info-box address,
    .provet-info-box p {
        font-style: normal !important;
        margin: 0 !important;
        font-size: 10pt !important;
        line-height: 1.4 !important;
    }

    /* ===== ORDER PRINT: ITEMS TABLE ===== */

    .order-details-items {
        margin: 0 !important;
    }

    .order-details-items .order-title {
        margin: 0 0 6pt !important;
    }

    .order-details-items .order-title strong {
        font-size: 12pt !important;
        color: #56AD3F !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .table-order-items th {
        background: #f0f0f0 !important;
        font-size: 9pt !important;
        padding: 4pt 6pt !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .table-order-items td {
        padding: 4pt 6pt !important;
        font-size: 10pt !important;
        vertical-align: top !important;
    }

    .table-order-items .col.name {
        width: 35% !important;
    }

    .table-order-items .col.name strong,
    .table-order-items .col.name .product-item-name {
        font-size: 9pt !important;
        font-weight: bold !important;
        color: #333333 !important;
    }

    /* Compact totals */
    .order-details-items .order-totals {
        margin-top: 6pt !important;
    }

    .order-details-items .order-totals th,
    .order-details-items .order-totals td {
        padding: 2pt 6pt !important;
        font-size: 10pt !important;
    }

    /* Hide print-irrelevant elements */
    .actions-toolbar,
    .block-order-details-view:not(.print-order-info) .block-title {
        display: none !important;
    }

    /* Page header: date left, order# right */
    .page-print .logo {
        margin: 0 0 8pt !important;
    }

    /* Remove excessive whitespace from page-main-title */
    .page-main-title {
        margin: 4pt 0 8pt !important;
        padding: 0 !important;
    }

    .page-main-title .base {
        font-size: 14pt !important;
        color: #56AD3F !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page {
        margin: 1.5cm 1.2cm;
    }
}

/* ===== QTY RESTRICTION TAGS (Cart/Checkout) ===== */
.product-qty-restrictions-tags {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.qty-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.qty-min-tag {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.qty-max-tag {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc02;
}
