/*---------------------------------------------------------------------------------

 Theme Name:   Ripla - Divi Child Theme
 Theme URI:
 Description:  Consolidated styles for SONIC tables and Divi Tabs (brand #0077b6).
 Author:       Ripla
 Template:     Divi
 Version:      1.1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

------------------------------ ADDITIONAL CSS HERE ------------------------------*/


/* ========================================================================
   SECTION 1 — ORIGINAL CHILD THEME style.css CONTENT
   ======================================================================== */

/* =========================
   Global tweaks / utilities
   ========================= */

/* Hide cart info globally */
.et-cart-info,
.et-cart-info span {
  display: none !important;
}

/* Lock Divi contact subject field */
.et_pb_contact_form input[data-original_id="subject"] {
  pointer-events: none;
  background-color: #f5f5f5;
}

/* ===== Blurb 3:2 image ratio ===== */
.et_pb_blurb.pa-blurb-image-3-2 .et_pb_main_blurb_image { display: block; position: relative; }
.et_pb_blurb.pa-blurb-image-3-2 .et_pb_image_wrap { padding-top: 66.66%; }
.et_pb_blurb.pa-blurb-image-3-2 .et_pb_image_wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* ===== Desktop dropdown auto-width ===== */
@media only screen and (min-width: 981px) {
  .nav li ul { width: fit-content; display: flex; flex-direction: column; }
  .nav li li { white-space: nowrap; }
  .nav li li a { width: auto !important; }
}

/* ===== Header menu: label + description stacked ===== */
#top-menu > li > a {
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2;
}
#top-menu .menu-item-desc {
  display: block; font-size: 12px; opacity: 0.8; margin-top: 3px; white-space: normal;
  color: #0077b6; text-transform: capitalize;
}
.et_header_style_left #top-menu > li > a,
.et_header_style_split #top-menu > li > a,
.et_header_style_centered #top-menu > li > a {
  padding-top: 10px; padding-bottom: 10px;
}
.et_mobile_menu .menu-item-desc { display: block; font-size: 12px; opacity: 0.85; margin-top: 2px; }


/**********************************************************
 * RIPLA – Vertical Tabs: Woo Category Grid Styling
 * (ORIGINAL CHILD THEME CONTENT)
 **********************************************************/

#ripla-tabs-vertical .woocommerce ul.products,
#ripla-tabs-vertical .woocommerce-page ul.products {
  margin: 0 -12px;
  padding: 0;
  list-style: none;
  clear: both;
}

#ripla-tabs-vertical .dsm-title-wrapper .dsm-title {
    font-size: 20px !important;
    font-weight: 700;
}

/* Card base */
#ripla-tabs-vertical .woocommerce ul.products li.product,
#ripla-tabs-vertical .woocommerce-page ul.products li.product {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px !important;
  margin: 0 12px 24px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  overflow: hidden;
}

#ripla-tabs-vertical .woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.10);
  border-color: #0077b6;
}

/* Product image */
#ripla-tabs-vertical .woocommerce ul.products li.product a img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #f7f9fb;
  border-radius: 8px;
  padding: 10px;
}

/* Title */
#ripla-tabs-vertical .woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #0f2954 !important;
  text-align: center;
  line-height: 1.3;
  margin: 14px 6px 0 6px !important;
  min-height: 48px;
}

#ripla-tabs-vertical .woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #0077b6 !important;
}

#ripla-tabs-vertical .woocommerce ul.products li.product:hover {
  border-color: #ffd700;
}

/* Force 2-column grid */
#ripla-tabs-vertical .woocommerce ul.products,
#ripla-tabs-vertical .woocommerce-page ul.products {
  display: flex;
  flex-wrap: wrap;
  margin: -12px;
  padding: 0;
  list-style: none;
}

#ripla-tabs-vertical .woocommerce ul.products li.product,
#ripla-tabs-vertical .woocommerce-page ul.products li.product {
  width: calc(50% - 24px);
  margin: 12px;
  float: none;
}

#ripla-tabs-vertical .woocommerce ul.products li.product:only-child,
#ripla-tabs-vertical .woocommerce-page ul.products li.product:only-child {
  width: 520px;
  max-width: 100%;
  margin: 12px auto;
}

@media (max-width: 767px) {
  #ripla-tabs-vertical .woocommerce ul.products li.product,
  #ripla-tabs-vertical .woocommerce-page ul.products li.product {
    width: 100%;
    margin: 10px 0;
  }
}

/* Header inside tab */
#ripla-tabs-vertical .rpl-tab-header {
  margin: 0 0 20px 0;
  padding: 14px 0 12px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

#ripla-tabs-vertical .rpl-tab-header-title {
  margin: 0 0 6px 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  color: #0077b6;
  letter-spacing: 0.2px;
}

#ripla-tabs-vertical .rpl-tab-header-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 10px auto 0;
  background: #ffd700;
  border-radius: 2px;
}

#ripla-tabs-vertical .rpl-tab-header-subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #0f2a46;
  opacity: .85;
}

@media (max-width: 767px) {
  #ripla-tabs-vertical .rpl-tab-header-title { font-size: 24px; }
}



/* ========================================================================
   SECTION 2 — FROM: Divi Theme Options → Custom CSS
   ======================================================================== */

/* ACF BULLETS */
.acf-bullet {
  display: block;
  position: relative;
  padding-left: 1.9em;
  margin: 0.4em 0;
}

.acf-bullet:empty::before {
  display: none !important;
}

.acf-bullet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.3em;
  height: 1.3em;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1.5' y='1.5' width='17' height='17' rx='2' ry='2' fill='none' stroke='%23ffd700' stroke-width='2.4'/%3E%3Cpath d='M6 10.5l3 3 5-6' fill='none' stroke='%23ffd700' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}


/**********************************************************
 * FIXED — RIPLA Supreme Tabs (restored original design)
 * Matches current Divi Supreme markup exactly
 **********************************************************/

/* Outer container */
#ripla-tabs-1 {
  border: 1px solid #053c7f;
  border-radius: 6px;
  overflow: hidden;
}

/* TAB LIST WRAPPER */
#ripla-tabs-1 .dsm-advanced-tabs-wrapper[role="tablist"] {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  border-bottom: 2px solid #053c7f !important;
  background: #ffffff;
}

/* INDIVIDUAL TABS */
#ripla-tabs-1 .dsm-tab {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center !important;
  padding: 12px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  border-right: 1px solid #cfe0f3 !important;
  cursor: pointer;
  transition: all .2s ease;
  background: #ffffff !important;
}

/* Remove last border */
#ripla-tabs-1 .dsm-tab:last-child {
  border-right: none !important;
}

/* TAB TITLE */
#ripla-tabs-1 .dsm-title {
  white-space: normal !important;
  line-height: 1.25;
  font-weight: 600;
  color: #053c7f !important;
  font-size: 16px;
}

/* ACTIVE TAB */
#ripla-tabs-1 .dsm-tab.dsm-active {
  background: #053c7f !important;
  border-right-color: #032b5d !important;
  border-top-left-radius: 6px !important;
  border-top-right-radius: 6px !important;
}

#ripla-tabs-1 .dsm-tab.dsm-active .dsm-title {
  color: #ffffff !important;
}

/* HOVER STATE */
#ripla-tabs-1 .dsm-tab:not(.dsm-active):hover {
  background: #f4f8ff !important;
  border-color: #cfe0f3 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

#ripla-tabs-1 .dsm-tab:not(.dsm-active):hover .dsm-title {
  color: #032b5d !important;
}

/* CONTENT WRAPPER */
#ripla-tabs-1 .dsm-advanced-tabs-content-wrapper {
  background: #ffffff !important;
  padding: 0 !important;
}

/* INDIVIDUAL CONTENT PANEL */
#ripla-tabs-1 .dsm-content-wrapper {
  background: #ffffff !important;
  padding: 16px !important;
  border: 1px solid #e8eef3 !important;
  border-top: none !important;
  box-shadow: none !important;
}

/* Fix Divi Supreme inline animation classes */
#ripla-tabs-1 .dsm-content-wrapper.animated {
  animation: none !important;
  opacity: 1 !important;
}

/* TABLE STYLING (restored original design) */
#ripla-tabs-1 table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 20px !important;
}

#ripla-tabs-1 table tr:first-child td {
  background: #053c7f !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid #d3d8e0 !important;
}

#ripla-tabs-1 table td {
  padding: 10px 12px !important;
  border: 1px solid #e2e6ec !important;
  vertical-align: top !important;
}

#ripla-tabs-1 table tr:nth-child(n+2):nth-child(even) {
  background: #f6f8fb !important;
}

/* MOBILE STACKING */
@media (max-width: 767px) {
  #ripla-tabs-1 .dsm-advanced-tabs-wrapper[role="tablist"] {
    flex-direction: column !important;
    border-bottom: none !important;
    border-left: 2px solid #053c7f !important;
  }

  #ripla-tabs-1 .dsm-tab {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #cfe0f3 !important;
    padding: 14px 12px !important;
  }

  #ripla-tabs-1 .dsm-tab:last-child {
    border-bottom: none !important;
  }
}



/***********************************************
 USED MACHINES — Clean Card Border + Hover Lift
***********************************************/
.used-machines-wrapper .woocommerce ul.products li.product,
.used-machines-wrapper .woocommerce-page ul.products li.product {
  background: #ffffff;
  border: 2px solid #e3e8ee;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  padding: 15px !important;
  transition: all .25s ease;
  overflow: hidden;
}

.used-machines-wrapper .woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  border-color: #0077b6;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.used-machines-wrapper .woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin-top: 14px !important;
  text-align: center;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #0077b6 !important;
}

.used-machines-wrapper .woocommerce ul.products li.product a.woocommerce-LoopProduct-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/*******************************************************
 * REMOVE ZOOM ICON + ZOOM OVERLAY
 *******************************************************/
.woocommerce-product-gallery__trigger,
.zoomImg {
    display: none !important;
}



/* ========================================================================
   SECTION 3 — FROM: Divi Theme Customiser → Additional CSS
   (DUPLICATE OF THEME OPTIONS — KEPT FOR A-VERSION COMPLETENESS)
   ======================================================================== */

/* (No unique CSS — all duplicated from Theme Options) */



/* ========================================================================
   SECTION 4 — FROM: Divi Builder → Page Settings → Custom CSS
   ======================================================================== */

/* ============================================================
   CUSTOM BULLET LIST
   ============================================================ */
.pa-bullet-list-1 ul {
    list-style-type: none!important;
}
.pa-bullet-list-1 ul li:before {
    content: '\e052'!important;
    color: #2cba6c;
    font-family: 'ETMODULES'!important;
    margin-right: 10px;
    margin-left: -14px;
    font-size: 1.2em!important;
}

/* ============================================================
   STANDARD LAYOUT — HORIZONTAL THUMBNAILS (80×80)
   ============================================================ */

.woocommerce div.product div.images {
    display: block;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image {
    padding: 0 !important;
    background: none !important;
}

.single-product .et_pb_wc_images img {
    box-shadow: none !important;
}
.single-product img {
    box-shadow: none !important;
}

/* ---------------------------------------------
   THUMBNAIL STRIP (HORIZONTAL SCROLL)
   --------------------------------------------- */
.woocommerce div.product div.images .flex-control-nav {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 10px 0 0 0;
    margin: 0 !important;
    scrollbar-width: thin;
}

.woocommerce div.product div.images .flex-control-nav::-webkit-scrollbar {
    height: 6px;
}
.woocommerce div.product div.images .flex-control-nav::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* ---------------------------------------------
   THUMBNAILS (80×80)
   --------------------------------------------- */
.woocommerce div.product div.images .flex-control-nav li {
    width: 80px !important;
    height: 80px !important;
    overflow: hidden;
    border-radius: 4px;
    margin-right: 10px !important;
    display: inline-block !important;
    cursor: pointer !important;
}

.woocommerce div.product div.images .flex-control-nav li:last-child {
    margin-right: 0 !important;
}

.woocommerce div.product div.images .flex-control-nav li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
}
